FROM golang # Install libraries RUN go get \ github.com/gorilla/mux \ github.com/docker/docker/client \ github.com/docker/docker/api/types/network \ github.com/docker/docker/api/types/container \ github.com/docker/docker/api/types/mount \ docker.io/go-docker/api/types # Create workdir RUN mkdir /workdir WORKDIR /workdir # Copy our sources COPY src /workdir/src COPY hosted /workdir/hosted # and build them RUN go build -o /workdir/register src/*.go ENTRYPOINT [ "/workdir/register" ]