Browse Source

Dockerfile: `apk upgrade` before `add`

The base golang image ships with some packages pre-installed,
but they're not necessarily the latest. If we try to add a
package that (transitively) depends on one of the existing ones,
it'll fail if it's expecting a newer version.

To address this, simply `apk upgrade` before trying to `apk add`.

Closes #2071
tags/v2.12.0-rc1
Chris Smith 11 months ago
parent
commit
783b579003
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Dockerfile

+ 1
- 1
Dockerfile View File

@@ -1,7 +1,7 @@
1 1
 ## build ergo binary
2 2
 FROM golang:1.20-alpine AS build-env
3 3
 
4
-RUN apk add -U --force-refresh --no-cache --purge --clean-protected -l -u make git
4
+RUN apk upgrade -U --force-refresh --no-cache && apk add --no-cache --purge --clean-protected -l -u make git
5 5
 
6 6
 # copy ergo source
7 7
 WORKDIR /go/src/github.com/ergochat/ergo

Loading…
Cancel
Save