Skip to content

Commit

Permalink
alpine VERSION added
Browse files Browse the repository at this point in the history
  • Loading branch information
3x3cut0r committed Oct 31, 2023
1 parent 9159eee commit 0c48c61
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and Tag
id: tag
run: |
docker build -t 3x3cut0r/alpine:latest ./alpine
VERSION=$(docker run --rm 3x3cut0r/alpine:latest sh -c "cat /VERSION | grep alpine | cut -d= -f2")
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
# https://github.com/docker/build-push-action
- name: Build and push
uses: docker/build-push-action@v5
Expand All @@ -50,3 +57,4 @@ jobs:
push: true
tags: |
3x3cut0r/alpine:latest
3x3cut0r/alpine:${{ steps.tag.outputs.VERSION }}
24 changes: 18 additions & 6 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM alpine:latest
ARG IMAGE=alpine:latest

# App-Stage
FROM ${IMAGE}
ARG IMAGE

LABEL maintainer="Julian Reith <julianreith@gmx.de>"
LABEL description="official alpine linux with gosu, libcap installed"

# add gosu
WORKDIR /

# Add gosu
ENV GOSU_VERSION 1.16
RUN set -eux; \
\
Expand All @@ -16,21 +23,26 @@ RUN set -eux; \
wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch"; \
wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc"; \
\
# verify the signature
# Verify the signature
export GNUPGHOME="$(mktemp -d)"; \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
command -v gpgconf && gpgconf --kill all || :; \
rm -rf "$GNUPGHOME" /usr/local/bin/gosu.asc; \
\
# clean up fetch dependencies
# Clean up fetch dependencies
apk del --no-network .gosu-deps; \
\
chmod +x /usr/local/bin/gosu; \
# verify that the binary works
# Verify that the binary works
gosu --version; \
gosu nobody true

# add dependencies for all images
# Add dependencies for all images
RUN apk add --no-cache tzdata \
libcap

# Store versions in /VERSION
RUN touch /VERSION && \
echo "alpine=$(cat /etc/alpine-release)" > /VERSION && \
echo "gosu=$GOSU_VERSION" >> /VERSION

0 comments on commit 0c48c61

Please sign in to comment.