Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build and test steps for the rocky image #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,19 @@ jobs:

- name: Test alpine image
run: tests/run $IMAGE_NAME:alpine

- name: Build rocky image
run: |
docker build . \
--pull=true \
--file=Dockerfile-rocky \
--tag="$IMAGE_NAME:rocky" \
--label="org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
--label="org.opencontainers.image.revision=$GITHUB_SHA" \
--label="org.opencontainers.image.created=$(date --rfc-3339=seconds)"

- name: Test rocky image
run: tests/run $IMAGE_NAME:rocky

- name: Verify signature
if: github.ref == 'refs/heads/master'
Expand All @@ -78,9 +91,12 @@ jobs:

TAG_DEBIAN=docker.pkg.github.com/$GITHUB_REPOSITORY/debian
TAG_ALPINE=docker.pkg.github.com/$GITHUB_REPOSITORY/alpine
TAG_ROCKY=docker.pkg.github.com/$GITHUB_REPOSITORY/rocky
docker tag $IMAGE_NAME:debian $TAG_DEBIAN
docker tag $IMAGE_NAME:alpine $TAG_ALPINE
docker tag $IMAGE_NAME:rocky $TAG_ROCKY
docker push $TAG_DEBIAN
docker push $TAG_ALPINE
docker push $TAG_ROCKY
docker logout docker.pkg.github.com

20 changes: 20 additions & 0 deletions Dockerfile-rocky
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM rockylinux:9
MAINTAINER Mathias Rhein [funkemedien.de]

# Steps done in one RUN layer:
# - Install packages
# - OpenSSH needs /var/run/sshd to run
# - Remove generic host keys, entrypoint generates unique keys
RUN dnf -y update && \
dnf -y install openssh-server && \
dnf clean all && \
mkdir -p /var/run/sshd && \
rm -f /etc/ssh/ssh_host_*key*

COPY files/sshd_config /etc/ssh/sshd_config
COPY files/create-sftp-user /usr/local/bin/
COPY files/entrypoint /

EXPOSE 22

ENTRYPOINT ["/entrypoint"]