You've already forked docker-compose-docker
feat(deps): upgrade to docker-compose v5
The following downloads the finished docker-compose v5 binary and delivers it as a scratch container image.
This commit is contained in:
@@ -1,10 +1,5 @@
|
||||
name: Build
|
||||
|
||||
env:
|
||||
GONOSUMDB: ${{ vars.GONOSUMDB }}
|
||||
GOPRIVATE: ${{ vars.GOPRIVATE }}
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
@@ -21,17 +16,12 @@ jobs:
|
||||
runs-on: ubuntu-latest-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- uses: docker/setup-qemu-action@v3.7.0
|
||||
- uses: docker/setup-buildx-action@v3.11.1
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
TAG=latest
|
||||
|
||||
docker buildx build \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--platform linux/arm64 \
|
||||
--file Dockerfile \
|
||||
--provenance false \
|
||||
@@ -42,17 +32,12 @@ jobs:
|
||||
runs-on: ubuntu-latest-amd64
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- uses: docker/setup-qemu-action@v3.7.0
|
||||
- uses: docker/setup-buildx-action@v3.11.1
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
TAG=latest
|
||||
|
||||
docker buildx build \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--platform linux/amd64 \
|
||||
--file Dockerfile \
|
||||
--provenance false \
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
name: Release
|
||||
|
||||
env:
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
@@ -35,9 +32,6 @@ jobs:
|
||||
fetch-tags: true
|
||||
ref: "${{ steps.version_extraction.outputs.version_raw }}"
|
||||
|
||||
- uses: docker/setup-qemu-action@v3.7.0
|
||||
- uses: docker/setup-buildx-action@v3.11.1
|
||||
|
||||
- uses: docker/login-action@v3.6.0
|
||||
with:
|
||||
registry: git.cryptic.systems
|
||||
@@ -48,9 +42,6 @@ jobs:
|
||||
run: |
|
||||
docker buildx build \
|
||||
--build-arg DC_VERSION=${{ steps.version_extraction.outputs.version_raw }} \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--file Dockerfile \
|
||||
--platform linux/arm64 \
|
||||
--provenance false \
|
||||
@@ -78,9 +69,6 @@ jobs:
|
||||
fetch-tags: true
|
||||
ref: "${{ steps.version_extraction.outputs.version_raw }}"
|
||||
|
||||
- uses: docker/setup-qemu-action@v3.7.0
|
||||
- uses: docker/setup-buildx-action@v3.11.1
|
||||
|
||||
- uses: docker/login-action@v3.6.0
|
||||
with:
|
||||
registry: git.cryptic.systems
|
||||
@@ -91,9 +79,6 @@ jobs:
|
||||
run: |
|
||||
docker buildx build \
|
||||
--build-arg DC_VERSION=${{ steps.version_extraction.outputs.version_raw }} \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--file Dockerfile \
|
||||
--platform linux/amd64 \
|
||||
--provenance false \
|
||||
|
||||
@@ -10,8 +10,7 @@ on:
|
||||
|
||||
jobs:
|
||||
update-description-on-hub-docker-io:
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- uses: peter-evans/dockerhub-description@v5.0.0
|
||||
|
||||
34
Dockerfile
34
Dockerfile
@@ -1,21 +1,23 @@
|
||||
FROM docker.io/library/golang:1.25.5-alpine3.21 AS build
|
||||
FROM docker.io/library/ubuntu:24.04 AS download
|
||||
|
||||
ARG DC_VERSION=main
|
||||
ARG GONOSUMDB
|
||||
ARG GOPRIVATE
|
||||
ARG GOPROXY
|
||||
ARG DC_VERSION
|
||||
|
||||
RUN set -ex && \
|
||||
apk update && \
|
||||
apk upgrade && \
|
||||
apk add git make
|
||||
RUN NAME=docker-compose-$(uname | tr [:upper:] [:lower:])-$(uname -m); \
|
||||
apt update --yes && \
|
||||
apt install --yes curl && \
|
||||
curl \
|
||||
--fail \
|
||||
--output "/tmp/${NAME}" \
|
||||
--location "https://github.com/docker/compose/releases/download/${DC_VERSION}/${NAME}" && \
|
||||
curl \
|
||||
--fail \
|
||||
--output /tmp/checksums.txt \
|
||||
--location "https://github.com/docker/compose/releases/download/${DC_VERSION}/checksums.txt" && \
|
||||
(cd /tmp && sha256sum --ignore-missing --check checksums.txt) && \
|
||||
ln -s "${NAME}" /tmp/docker-compose && \
|
||||
chmod +x /tmp/docker-compose
|
||||
|
||||
RUN git clone https://github.com/docker/compose.git --branch ${DC_VERSION} docker-compose && \
|
||||
cd docker-compose && \
|
||||
make DESTDIR=/cache
|
||||
|
||||
FROM docker.io/library/alpine:3.23
|
||||
|
||||
COPY --from=build /cache/docker-compose /usr/bin/docker-compose
|
||||
FROM scratch
|
||||
|
||||
COPY --from=download /tmp/docker-compose /usr/bin/docker-compose
|
||||
ENTRYPOINT [ "/usr/bin/docker-compose" ]
|
||||
|
||||
10
Makefile
10
Makefile
@@ -1,6 +1,6 @@
|
||||
# DC_VERSION
|
||||
# Only required to install a specify version
|
||||
DC_VERSION?=v2.40.3 # renovate: datasource=github-releases depName=docker/compose
|
||||
DC_VERSION?=v5.0.0 # renovate: datasource=github-releases depName=docker/compose
|
||||
|
||||
# CONTAINER_RUNTIME
|
||||
# The CONTAINER_RUNTIME variable will be used to specified the path to a container runtime. This is needed to start and
|
||||
@@ -17,20 +17,12 @@ DC_IMAGE_NAME:=docker-compose
|
||||
DC_IMAGE_VERSION?=latest
|
||||
DC_IMAGE_FULLY_QUALIFIED=${DC_IMAGE_REGISTRY_NAME}/${DC_IMAGE_NAMESPACE}/${DC_IMAGE_NAME}:${DC_IMAGE_VERSION}
|
||||
|
||||
# Golang related environment variables
|
||||
GONOSUMDB?=
|
||||
GOPRIVATE?=
|
||||
GOPROXY?=
|
||||
|
||||
# BUILD CONTAINER IMAGE
|
||||
# =====================================================================================================================
|
||||
PHONY:=container-image/build
|
||||
container-image/build:
|
||||
${CONTAINER_RUNTIME} build \
|
||||
--build-arg DC_VERSION=${DC_VERSION} \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--file Dockerfile \
|
||||
--no-cache \
|
||||
--pull \
|
||||
|
||||
Reference in New Issue
Block a user