updating Dockerfile

This commit is contained in:
“nishant-sharma”
2021-03-31 10:54:39 +05:30
parent 36f841d7f0
commit 1746cfe2e3

View File

@@ -1,18 +1,28 @@
FROM golang:1.16
RUN mkdir $GOPATH/app
WORKDIR $GOPATH/app
RUN mkdir -p /app/janus
WORKDIR /app/janus
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go version
RUN go env
# Download all the dependencies
RUN go get -d -v ./...
# Install the package
RUN go install -v ./...
RUN go build -o ./out/janus .
EXPOSE 8000
CMD ["go", "run", "main.go"]
CMD ["./out/janus"]
# COPY . .
#
# # Download all the dependencies
# RUN go get -d -v ./...
#
# # Install the package
# RUN go install -v ./...
#
# EXPOSE 8000
#
# CMD ["go", "run", "main.go"]