Skip to content

Commit

Permalink
Merge pull request #114 from crazy-max/update-alpine
Browse files Browse the repository at this point in the history
dockerfile: update go to 1.23 and alpine to 3.21
  • Loading branch information
crazy-max authored Dec 10, 2024
2 parents f22f986 + a37396b commit 872946d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
-
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.23"
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

ARG GO_VERSION="1.21"
ARG ALPINE_VERSION="3.19"
ARG XX_VERSION="1.4.0"
ARG GO_VERSION="1.23"
ARG ALPINE_VERSION="3.21"
ARG XX_VERSION="1.6.1"

FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx

Expand All @@ -40,7 +40,7 @@ RUN --mount=target=. <<EOT
echo "-extldflags -static -X ${pkg}/version.Version=${version} -X ${pkg}/version.SyftVersion=$(go list -mod=mod -u -m -f '{{.Version}}' 'github.com/anchore/syft')" | tee /tmp/.ldflags
EOT

FROM base as build
FROM base AS build
ARG TARGETPLATFORM
RUN --mount=type=bind,target=. \
--mount=type=bind,from=version,source=/tmp/.ldflags,target=/tmp/.ldflags \
Expand Down
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

variable "GO_VERSION" {
default = "1.21"
default = null
}

# GITHUB_REF is the actual ref that triggers the workflow and used as version
Expand Down
6 changes: 6 additions & 0 deletions examples/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

FROM centos:7 AS base
ARG BUILDKIT_SBOM_SCAN_STAGE=true

# fix name of Centos repos as mirror.centos.org no longer exists
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo

RUN yum install -y findutils
COPY <<EOF /empty
EOF
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/docker/buildkit-syft-scanner

go 1.21.0
go 1.23.0

require (
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/vendor.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

# upstream at https://github.com/moby/buildkit/blob/master/hack/dockerfiles/vendor.Dockerfile

ARG GO_VERSION="1.21"
ARG ALPINE_VERSION="3.17"
ARG GO_VERSION="1.23"
ARG ALPINE_VERSION="3.21"

FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS base
RUN apk add --no-cache git rsync
Expand Down

0 comments on commit 872946d

Please sign in to comment.