浏览代码

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 个月前
父节点
当前提交
783b579003
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Dockerfile

+ 1
- 1
Dockerfile 查看文件

@@ -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

正在加载...
取消
保存