I am confused about whether . means that it\'s a shortened abbreviation of the current directory of the image or if it\'s the current working directory on the l
It depends on the context. In your COPY somecode.java . it's the image. In COPY . . it's both. The first dot is in the local machine and the second dot is the image.
In the docker build command, it tells Docker to take files for the newly built image from the working directory on your local machine.
As others said, it's basically just means "current working directory". But when building a Docker image, there are two of those. One in your local machine where you're building the image. The second one is the file system that's built in the image.