Ver código fonte

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 1 ano atrás
pai
commit
783b579003
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      Dockerfile

+ 1
- 1
Dockerfile Ver arquivo

1
 ## build ergo binary
1
 ## build ergo binary
2
 FROM golang:1.20-alpine AS build-env
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
 # copy ergo source
6
 # copy ergo source
7
 WORKDIR /go/src/github.com/ergochat/ergo
7
 WORKDIR /go/src/github.com/ergochat/ergo

Carregando…
Cancelar
Salvar