I am new to Docker and am experiencing a problem that I am unable to resolve. I have the current version of docker installed on Ubuntu 16. I’m trying to get a very basic container up and running with a custom image.
For the image I have a simple http server written in Go. This app is a single go file that uses only standard Go libraries. It launches a http server on port 8086 and when I browse to it it returns “hello from go”.
My directory structure is as follows
/opt/dockerimages/test/DockerFile
/opt/dockerimages/test/dockertest/servertest.go
The contents of my DockerFile are:
FROM golang:1.8-alphine
COPY …/dockertest /dockertest
WORKDIR /dockertest
RUN go run servertest.go
To build the container I am issuing this command from inside the /opt/dockerimages/test working directory
docker build -t first_container .
and I continue to get back this error message
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /opt/dockerimages/test/Dockerfile: no such file or directory
I’ve tried commenting out everything except FROM golang:1.8-alphine and I continue to get the same error message when attempting to build the image.
Thanks!