You've already forked docker-compose-docker
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
13e459e4a1
|
|||
|
e862dccb03
|
|||
|
dc9f1b5504
|
|||
|
b520406551
|
|||
|
95257314af
|
|||
|
198e59ef56
|
|||
|
ff4c47dfb2
|
|||
|
21ff2f510b
|
|||
|
ae89e1e65d
|
|||
|
3add6b6f5e
|
|||
|
94db71a858
|
|||
|
1198dc5559
|
|||
|
405d7abb25
|
|||
|
c4a5b87082
|
|||
|
d84cc78259
|
@@ -4,7 +4,7 @@ on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
paths:
|
||||
- Makefile
|
||||
- Dockerfile
|
||||
|
||||
env:
|
||||
GIT_EMAIL: noreply@cryptic.systems
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@@ -26,8 +26,8 @@ jobs:
|
||||
run: |
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
|
||||
for file in Makefile; do
|
||||
if git diff HEAD~1 HEAD -- "${file}" | grep --quiet '^[+-]DC_VERSION'; then
|
||||
for file in Dockerfile; do
|
||||
if git diff HEAD~1 HEAD -- "${file}" | grep --quiet '^[+-]ARG DC_VERSION'; then
|
||||
echo "DC_VERSION line changed."
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
break
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
id: create_tag
|
||||
if: steps.check_change.outputs.changed == 'true'
|
||||
run: |
|
||||
defined_tag="$(grep --only-matching --perl-regexp 'DC_VERSION\?=v?[\d]*(\.[\d]*){0,2}' Makefile | cut --delimiter='=' --fields=2)"
|
||||
defined_tag="$(grep --only-matching --perl-regexp 'ARG DC_VERSION=v?[\d]*(\.[\d]*){0,2}' Dockerfile | cut --delimiter='=' --fields=2)"
|
||||
|
||||
echo "defined_tag=${defined_tag}" >> $GITHUB_OUTPUT
|
||||
echo "New tag: ${defined_tag}"
|
||||
@@ -53,6 +53,7 @@ jobs:
|
||||
git push origin "${defined_tag}"
|
||||
|
||||
- name: Trigger "Push tagged images" workflow
|
||||
if: steps.check_change.outputs.changed == 'true'
|
||||
uses: actions/github-script@v8.0.0
|
||||
with:
|
||||
script: |
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
name: Build
|
||||
|
||||
env:
|
||||
GONOSUMDB: ${{ vars.GONOSUMDB }}
|
||||
GOPRIVATE: ${{ vars.GOPRIVATE }}
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- "opened"
|
||||
- "reopened"
|
||||
- "synchronize"
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
@@ -20,8 +15,8 @@ jobs:
|
||||
build-arm64:
|
||||
runs-on: ubuntu-latest-arm64
|
||||
steps:
|
||||
- uses: actions/checkout@v5.0.0
|
||||
- uses: docker/setup-qemu-action@v3.6.0
|
||||
- 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
|
||||
@@ -29,9 +24,6 @@ jobs:
|
||||
TAG=latest
|
||||
|
||||
docker buildx build \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--platform linux/arm64 \
|
||||
--file Dockerfile \
|
||||
--provenance false \
|
||||
@@ -41,8 +33,8 @@ jobs:
|
||||
build-amd64:
|
||||
runs-on: ubuntu-latest-amd64
|
||||
steps:
|
||||
- uses: actions/checkout@v5.0.0
|
||||
- uses: docker/setup-qemu-action@v3.6.0
|
||||
- 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
|
||||
@@ -50,9 +42,6 @@ jobs:
|
||||
TAG=latest
|
||||
|
||||
docker buildx build \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--platform linux/amd64 \
|
||||
--file Dockerfile \
|
||||
--provenance false \
|
||||
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
markdown-lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5.0.0
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v21.0.0
|
||||
with:
|
||||
globs: '**/*.md'
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
name: Release
|
||||
|
||||
env:
|
||||
GOPROXY: ${{ vars.GOPROXY }}
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
@@ -30,12 +27,12 @@ jobs:
|
||||
echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/checkout@v5.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
with:
|
||||
fetch-tags: true
|
||||
ref: "${{ steps.version_extraction.outputs.version_raw }}"
|
||||
|
||||
- uses: docker/setup-qemu-action@v3.6.0
|
||||
- uses: docker/setup-qemu-action@v3.7.0
|
||||
- uses: docker/setup-buildx-action@v3.11.1
|
||||
|
||||
- uses: docker/login-action@v3.6.0
|
||||
@@ -47,14 +44,12 @@ jobs:
|
||||
- name: Build and push image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--platform linux/arm64 \
|
||||
--build-arg DC_VERSION=${{ steps.version_extraction.outputs.version_raw }} \
|
||||
--file Dockerfile \
|
||||
--platform linux/arm64 \
|
||||
--provenance false \
|
||||
--tag git.cryptic.systems/volker.raschek/docker-compose:${{ steps.version_extraction.outputs.version_cleaned }}-arm64 \
|
||||
--push \
|
||||
--tag git.cryptic.systems/volker.raschek/docker-compose:${{ steps.version_extraction.outputs.version_cleaned }}-arm64 \
|
||||
.
|
||||
|
||||
push-amd64:
|
||||
@@ -72,12 +67,12 @@ jobs:
|
||||
echo "version_raw=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "version_cleaned=${VERSION/v/}" >> $GITHUB_OUTPUT
|
||||
|
||||
- uses: actions/checkout@v5.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
with:
|
||||
fetch-tags: true
|
||||
ref: "${{ steps.version_extraction.outputs.version_raw }}"
|
||||
|
||||
- uses: docker/setup-qemu-action@v3.6.0
|
||||
- uses: docker/setup-qemu-action@v3.7.0
|
||||
- uses: docker/setup-buildx-action@v3.11.1
|
||||
|
||||
- uses: docker/login-action@v3.6.0
|
||||
@@ -89,14 +84,12 @@ jobs:
|
||||
- name: Build and push image
|
||||
run: |
|
||||
docker buildx build \
|
||||
--build-arg GONOSUMDB=${GONOSUMDB} \
|
||||
--build-arg GOPRIVATE=${GOPRIVATE} \
|
||||
--build-arg GOPROXY=${GOPROXY} \
|
||||
--platform linux/amd64 \
|
||||
--build-arg DC_VERSION=${{ steps.version_extraction.outputs.version_raw }} \
|
||||
--file Dockerfile \
|
||||
--platform linux/amd64 \
|
||||
--provenance false \
|
||||
--tag git.cryptic.systems/volker.raschek/docker-compose:${{ steps.version_extraction.outputs.version_cleaned }}-amd64 \
|
||||
--push \
|
||||
--tag git.cryptic.systems/volker.raschek/docker-compose:${{ steps.version_extraction.outputs.version_cleaned }}-amd64 \
|
||||
.
|
||||
|
||||
push-manifest:
|
||||
@@ -159,4 +152,4 @@ jobs:
|
||||
--src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
|
||||
--src-username volker.raschek \
|
||||
docker://git.cryptic.systems/volker.raschek/docker-compose:${{ steps.version_extraction.outputs.version_cleaned }} \
|
||||
docker://docker.io/volkerraschek/docker-compose:${{ steps.version_extraction.outputs.version_cleaned }}
|
||||
docker://docker.io/volkerraschek/docker-compose:${{ steps.version_extraction.outputs.version_cleaned }}
|
||||
|
||||
@@ -10,10 +10,9 @@ on:
|
||||
|
||||
jobs:
|
||||
update-description-on-hub-docker-io:
|
||||
runs-on:
|
||||
- ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5.0.0
|
||||
- uses: actions/checkout@v6.0.1
|
||||
- uses: peter-evans/dockerhub-description@v5.0.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_IO_USERNAME }}
|
||||
|
||||
34
Dockerfile
34
Dockerfile
@@ -1,21 +1,23 @@
|
||||
FROM docker.io/library/golang:1.25.3-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=v5.0.0
|
||||
|
||||
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.22
|
||||
|
||||
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" ]
|
||||
|
||||
13
Makefile
13
Makefile
@@ -1,7 +1,3 @@
|
||||
# DC_VERSION
|
||||
# Only required to install a specify version
|
||||
DC_VERSION?=v2.40.3 # 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
|
||||
# run a container image.
|
||||
@@ -17,20 +13,11 @@ 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 \
|
||||
|
||||
10
README.md
10
README.md
@@ -11,12 +11,12 @@ The workflow or how `docker-compose` can in general be used is documented at
|
||||
image.
|
||||
|
||||
```bash
|
||||
IMAGE_VERSION=2.40.3
|
||||
IMAGE_VERSION=5.0.0
|
||||
docker run \
|
||||
--rm \
|
||||
--volume ./path/to/docker-compose.yml:/workdir/docker-compose.yml:ro \
|
||||
--volume "$(pwd):$(pwd)" \
|
||||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--workdir /workdir \
|
||||
git.cryptic.systems/volker.raschek/docker-compose:${IMAGE_VERSION} \
|
||||
ps
|
||||
--workdir "$(pwd)" \
|
||||
"git.cryptic.systems/volker.raschek/docker-compose:${IMAGE_VERSION}" \
|
||||
version
|
||||
```
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
{
|
||||
"customType": "regex",
|
||||
"fileMatch": [
|
||||
"^Dockerfile$",
|
||||
"^README\\.md$"
|
||||
],
|
||||
"matchStrings": [
|
||||
"ARG DC_VERSION=(?<currentValue>.*)",
|
||||
"IMAGE_VERSION=(?<currentValue>.*)"
|
||||
],
|
||||
"datasourceTemplate": "github-releases",
|
||||
@@ -31,6 +33,10 @@
|
||||
],
|
||||
"matchManagers": [
|
||||
"regex"
|
||||
],
|
||||
"matchUpdateTypes": [
|
||||
"minor",
|
||||
"patch"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user