Skip to content

Commit 05c0c64

Browse files
committed
fix(docker): Reversed scratch & alpine images
1 parent e53da85 commit 05c0c64

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ WORKDIR /workspace
1010

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

1515
# Preparing the final image
16-
FROM alpine:3.16.2
16+
FROM scratch
1717
WORKDIR /app
1818
EXPOSE 2121-2130
1919
COPY --from=builder /workspace/ftpserver /bin/ftpserver

Dockerfile.alpine

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ WORKDIR /workspace
1010

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

1515
# Preparing the final image
16-
FROM scratch
16+
FROM alpine:3.16.2
1717
WORKDIR /app
1818
EXPOSE 2121-2130
1919
COPY --from=builder /workspace/ftpserver /bin/ftpserver

0 commit comments

Comments
 (0)