updating Dockerfile
This commit is contained in:
34
Dockerfile
34
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user