Skip to content

Commit f45cf04

Browse files
committed
fix: install mailcap in running-image not building-image
1 parent 50b1026 commit f45cf04

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ RUN go mod download
2727
# install git so that go will be able to write down current version when building
2828
RUN apk add --no-cache git
2929

30-
# install mailcap to add mime type support, https://stackoverflow.com/a/38033047
31-
RUN apk add --no-cache mailcap
32-
3330
# run go build, name the executable "go-api" and also disable CGO because people keep telling me that
3431
RUN CGO_ENABLED=0 go build -o go-api
3532

@@ -40,6 +37,9 @@ FROM alpine:${ALPINE_VERSION} AS running-image
4037
# ensure sqlite is available on running-image
4138
RUN apk add --no-cache sqlite
4239

40+
# install mailcap to add mime type support, https://stackoverflow.com/a/38033047
41+
RUN apk add --no-cache mailcap
42+
4343
# copy everything from our folder (so, repo + built executable) from our building-image into the same folder but into the second image
4444
# also exclude all the source files, so the final build is even smaller (although it saves like 20kb)
4545
# finally, exclude .git folder, we needed it in building-image to bake in version information, but not anymore

0 commit comments

Comments
 (0)