-
Notifications
You must be signed in to change notification settings - Fork 16
[ENH] new docker container to build apptainer containers. #150
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,48 @@ | ||||||||||
# This workflow uses actions that are not certified by GitHub. | ||||||||||
# They are provided by a third-party and are governed by | ||||||||||
# separate terms of service, privacy policy, and support | ||||||||||
# documentation. | ||||||||||
|
||||||||||
name: Create and publish a Docker image | ||||||||||
|
||||||||||
on: | ||||||||||
push: | ||||||||||
branches: ['master'] | ||||||||||
paths: | ||||||||||
- Dockerfile | ||||||||||
env: | ||||||||||
REGISTRY: ghcr.io | ||||||||||
IMAGE_NAME: ReproNim/repronim-buildenv | ||||||||||
|
||||||||||
jobs: | ||||||||||
build-and-push-image: | ||||||||||
runs-on: ubuntu-latest | ||||||||||
permissions: | ||||||||||
contents: read | ||||||||||
packages: write | ||||||||||
|
||||||||||
steps: | ||||||||||
- name: Checkout repository | ||||||||||
uses: actions/checkout@v4 | ||||||||||
|
||||||||||
- name: Log in to the Container registry | ||||||||||
uses: docker/login-action@v3.3.0 | ||||||||||
with: | ||||||||||
registry: ${{ env.REGISTRY }} | ||||||||||
username: repro-bot | ||||||||||
password: ${{ secrets.REPROBOT_REGISTRY_TOKEN }} | ||||||||||
Comment on lines
+32
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
to be more inline with setup we have in https://github.com/ReproNim/reprostim/blob/master/.github/workflows/docker.yml |
||||||||||
|
||||||||||
- name: Extract metadata (tags, labels) for Docker | ||||||||||
id: meta | ||||||||||
uses: docker/metadata-action@v5.6.1 | ||||||||||
with: | ||||||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||||||||||
|
||||||||||
- name: Build and push Docker image | ||||||||||
uses: docker/build-push-action@v6.13.0 | ||||||||||
with: | ||||||||||
context: . | ||||||||||
file: Dockerfile | ||||||||||
push: true | ||||||||||
tags: ${{ steps.meta.outputs.tags }} | ||||||||||
labels: ${{ steps.meta.outputs.labels }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM alpine:3.21.3 | ||
ENV PATH="/usr/local/apptainer/bin:$PATH" \ | ||
APPTAINER_TMPDIR="/tmp-apptainer" | ||
RUN apk add --no-cache apptainer py3-pytest ca-certificates libseccomp squashfs-tools tzdata fuse2fs fuse-overlayfs squashfuse \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
python3 py3-pip git openssh-client git-annex curl bzip2 bash\ | ||
&& mkdir -p $APPTAINER_TMPDIR \ | ||
&& cp /usr/share/zoneinfo/UTC /etc/localtime \ | ||
&& apk del tzdata \ | ||
&& rm -rf /tmp/* /var/cache/apk/* | ||
|
||
RUN pip install --break-system-packages --no-cache-dir datalad datalad-container | ||
Comment on lines
+4
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Additionally,
|
||
|
||
WORKDIR /work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you know value to use if for docker hub? https://github.com/docker/login-action?tab=readme-ov-file#docker-hub then does not use any then