Dockerfile: update ALPINE_VERSION to 3.18

This also moves `musl-dev` to the alpine-base stage, due to changes in
Alpine 3.18 causing gotestsum build to fail because stdlib.h was missing;

    #17 5.065 # runtime/cgo
    #17 5.065 In file included from _cgo_export.c:3:
    #17 5.065 /usr/include/fortify/stdlib.h:23:15: fatal error: stdlib.h: No such file or directory
    #17 5.065    23 | #include_next <stdlib.h>
    #17 5.065       |               ^~~~~~~~~~

alpine 3.17:

    / # find / | grep stdlib.h
    /usr/include/c++/12.2.1/tr1/stdlib.h
    /usr/include/c++/12.2.1/stdlib.h

alpine 3.18

    / # find / | grep stdlib.h
    /usr/lib/llvm16/lib/clang/16/include/__clang_hip_stdlib.h
    /usr/include/fortify/stdlib.h
    /usr/include/c++/12.2.1/tr1/stdlib.h
    /usr/include/c++/12.2.1/stdlib.h

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6a74a63ee2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-06-14 13:30:40 +02:00
parent 9d193ea872
commit 71c12cf295
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
5 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
ARG BASE_VARIANT=alpine
ARG GO_VERSION=1.20.12
ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.18
ARG XX_VERSION=1.1.1
ARG GOVERSIONINFO_VERSION=v1.3.0
ARG GOTESTSUM_VERSION=v1.10.0

View File

@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.18
FROM alpine:${ALPINE_VERSION} AS gen
RUN apk add --no-cache bash git

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.20.12
ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.18
ARG BUILDX_VERSION=0.11.2
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.20.12
ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.18
ARG GOLANGCI_LINT_VERSION=v1.52.2
FROM golangci/golangci-lint:${GOLANGCI_LINT_VERSION}-alpine AS golangci-lint

View File

@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION=1.20.12
ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.18
ARG MODOUTDATED_VERSION=v0.8.0
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base