Skip to content

Commit

Permalink
update: change image golang:1.20 to golang:1.20-alpine3.19
Browse files Browse the repository at this point in the history
  • Loading branch information
belajarqywok committed Jul 15, 2024
1 parent a8ebadf commit cba264f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
FROM golang:1.20
FROM golang:1.20-alpine3.19

LABEL creator="qywok"

WORKDIR /app
ENV APP_DIR=/tebakaja_proxy \
GO111MODULE=on \
CGO_ENABLED=0

WORKDIR ${APP_DIR}

COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN go build -o main
RUN go build -o main . && \
go clean -modcache && \
rm -rf /var/cache/apk/* /root/.cache/go-build /root/go/pkg && \
find . -type f ! -name 'main' ! -name '.env' -delete && \
find . -type d -empty -not -path './docs' -delete

EXPOSE 7860

Expand Down

0 comments on commit cba264f

Please sign in to comment.