Skip to content

Commit

Permalink
e2e: tini
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed May 11, 2023
1 parent 82a943b commit 7d276ea
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:
branches:
- master
pull_request:
branches:
- master

env:
REPO_SLUG: tonistiigi/binfmt
Expand Down Expand Up @@ -146,6 +144,9 @@ jobs:
include:
- dockerfile: ejabberd
platform: linux/arm64
- dockerfile: tini
platform: linux/arm64
run: true
steps:
-
name: Checkout
Expand All @@ -172,6 +173,18 @@ jobs:
working-directory: test/dockerfiles/${{ matrix.dockerfile }}
run: |
docker buildx build --platform ${{ matrix.platform }} --output type=cacheonly .
-
name: Load image
if: ${{ matrix.run }}
working-directory: test/dockerfiles/${{ matrix.dockerfile }}
run: |
docker buildx build --platform ${{ matrix.platform }} -t ${{ matrix.dockerfile }}:local --load .
-
name: Run
if: ${{ matrix.run }}
working-directory: test/dockerfiles/${{ matrix.dockerfile }}
run: |
docker run --rm --platform ${{ matrix.platform }} ${{ matrix.dockerfile }}:local
build:
runs-on: ubuntu-latest
Expand Down
22 changes: 22 additions & 0 deletions test/dockerfiles/tini/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# syntax=docker/dockerfile:1

ARG TINI_VERSION="v0.19.0"

FROM alpine:3.17
RUN apk add --no-cache file wget
ARG TINI_VERSION
ARG TARGETPLATFORM
RUN <<EOT
TINI_ARCH=$(case ${TARGETPLATFORM} in
"linux/amd64") echo "amd64" ;;
"linux/arm/v6") echo "armel" ;;
"linux/arm/v7") echo "armhf" ;;
"linux/arm64") echo "arm64" ;;
"linux/ppc64le") echo "ppc64le" ;;
"linux/s390x") echo "390x" ;;
*) echo "" ;; esac)
wget -q "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static-${TINI_ARCH}" -qO /tini
chmod +x /tini
file /tini
EOT
CMD [ "/tini", "-s", "--", "uname", "-a" ]

0 comments on commit 7d276ea

Please sign in to comment.