Fix container duplication
This commit is contained in:
21
Dockerfile
Normal file
21
Dockerfile
Normal file
@ -0,0 +1,21 @@
|
||||
FROM golang:alpine as builder
|
||||
|
||||
# Application Directory
|
||||
RUN mkdir /app
|
||||
WORKDIR /app
|
||||
|
||||
# First handle dependencies as those probably are more stable than rest of codebase
|
||||
COPY ./go.mod /app/
|
||||
COPY ./go.sum /app/
|
||||
RUN go mod download
|
||||
|
||||
# Copy source and build app
|
||||
COPY . /app
|
||||
RUN go build .
|
||||
|
||||
FROM alpine
|
||||
|
||||
# Copy over the app from the builder image
|
||||
COPY --from=builder /app/lookbuilding /lookbuilding
|
||||
|
||||
ENTRYPOINT ["/lookbuilding"]
|
||||
Reference in New Issue
Block a user