Skip to content

Commit

Permalink
chore(dockerfile): adding build and staging stages (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy authored Aug 25, 2024
1 parent c9ae81a commit f84aa35
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
FROM golang:1.23.0-alpine3.19 as builder

# Set necessary environment variables for the Go proxy
# ENV GO111MODULE=on
# ENV GOPROXY=https://goproxy.io,direct
# Build
FROM golang:1.23.0-alpine3.19 AS builder

WORKDIR /app

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

COPY . .

RUN go build -o wrapto .

# Staging
FROM alpine:3.19

WORKDIR /app

COPY --from=builder /app/wrapto .

EXPOSE 3000

CMD ["./wrapto"]

0 comments on commit f84aa35

Please sign in to comment.