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

adding unprivileged minimal container #96

Merged
merged 1 commit into from
May 14, 2024
Merged
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
31 changes: 31 additions & 0 deletions .github/workflows/manual-docker-min-unprv-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow builds and uploads a the minimal docker image
# It's only meant to be manually invoked when the automated python-docker-publish.yml
# file errors out and the image needs to be rebuilt.

name: Manual Docker Min Build

on:
workflow_dispatch:
inputs:
tag:
description: "docker image tag"
required: true
type: string

jobs:
docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker Setup Buildx
uses: docker/[email protected]
- name: Build and push the Docker image
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERIMAGE_TAG: ${{ inputs.tag }}
run: |
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
docker buildx build . --push --file Dockerfile.minimal-unprivileged \
--tag netapp/astra-toolkits:latest-minimal-unprivileged --tag netapp/astra-toolkits:$DOCKERIMAGE_TAG-minimal-unprivileged \
--platform linux/amd64,linux/arm64
8 changes: 8 additions & 0 deletions Dockerfile.minimal-unprivileged
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.12.3-alpine3.19
RUN apk add --no-cache jq curl
RUN adduser -D worker
USER worker
WORKDIR /home/worker
ENV PATH="/home/worker/.local/bin:${PATH}"
RUN pip install --user actoolkit
CMD ["/bin/sh"]