From 783b579003aad847586b02621ecdcf4c58c3f8aa Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sat, 3 Jun 2023 00:12:50 +0100 Subject: [PATCH] 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 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3c537fb6..06cc93f1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ## build ergo binary FROM golang:1.20-alpine AS build-env -RUN apk add -U --force-refresh --no-cache --purge --clean-protected -l -u make git +RUN apk upgrade -U --force-refresh --no-cache && apk add --no-cache --purge --clean-protected -l -u make git # copy ergo source WORKDIR /go/src/github.com/ergochat/ergo