Try building an image
This commit is contained in:
@ -4,9 +4,9 @@ WORKDIR /app
|
||||
COPY go.mod ./
|
||||
COPY go.sum ./
|
||||
RUN go mod download
|
||||
COPY *.go ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /softplayer-backend
|
||||
COPY . ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /app
|
||||
|
||||
FROM scratch
|
||||
COPY --from=0 /app/softplayer-backend /bin/softplayer-backend
|
||||
CMD ["/bin/softplayer-backend"]
|
||||
COPY --from=0 /app /app
|
||||
CMD ["/app"]
|
||||
|
Reference in New Issue
Block a user