Skip to content

Commit

Permalink
fix(docker): Reversed scratch & alpine images
Browse files Browse the repository at this point in the history
  • Loading branch information
fclairamb committed Sep 25, 2022
1 parent e53da85 commit 05c0c64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ WORKDIR /workspace

# Building
COPY . .
RUN go build -v -o ftpserver
RUN CGO_ENABLED=0 go build -mod=readonly -ldflags='-w -s' -v -o ftpserver

# Preparing the final image
FROM alpine:3.16.2
FROM scratch
WORKDIR /app
EXPOSE 2121-2130
COPY --from=builder /workspace/ftpserver /bin/ftpserver
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ WORKDIR /workspace

# Building
COPY . .
RUN CGO_ENABLED=0 go build -mod=readonly -ldflags='-w -s' -v -o ftpserver
RUN go build -v -o ftpserver

# Preparing the final image
FROM scratch
FROM alpine:3.16.2
WORKDIR /app
EXPOSE 2121-2130
COPY --from=builder /workspace/ftpserver /bin/ftpserver
Expand Down

0 comments on commit 05c0c64

Please sign in to comment.