13 lines
319 B
Docker
13 lines
319 B
Docker
FROM golang AS build
|
|
# RUN apk --no-cache add gcc g++ make git
|
|
WORKDIR /go/src/app
|
|
COPY . .
|
|
RUN go mod tidy
|
|
# RUN GOOS=linux go build -ldflags="-s -w" -o ./bin/web-app
|
|
RUN GOOS=linux go build -o ./bin/web-app
|
|
|
|
FROM ubuntu
|
|
WORKDIR /usr/bin
|
|
COPY --from=build /go/src/app/bin /go/bin
|
|
EXPOSE 3000
|
|
ENTRYPOINT /go/bin/web-app |