-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from cdot65:29-enhancement-ship-docker-contain…
…er-for-pan-os-upgrade-script-execution Add Dockerfile and GitHub Actions workflow for Docker image
- Loading branch information
Showing
24 changed files
with
1,326 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build and push Docker image to GitHub Container Registry | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
publish-container-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build the container image | ||
run: | | ||
docker build --tag ghcr.io/cdot65/pan-os-upgrade:latest | ||
docker push ghcr.io/cdot65/pan-os-upgrade:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Use an official Python runtime as a parent image, based on Alpine | ||
FROM python:3.12-alpine | ||
|
||
# Install dependencies required for compiling certain Python packages | ||
# gcc and musl-dev are required for compiling C extensions | ||
# libffi-dev is required for the cffi package | ||
# make is often required for building packages | ||
RUN apk add --no-cache gcc musl-dev libffi-dev make | ||
|
||
# Set the working directory in the container to /app | ||
WORKDIR /app | ||
|
||
# Copy the requirements file into the container at /app | ||
COPY requirements.txt /app/ | ||
|
||
# Install any needed packages specified in requirements.txt | ||
# Note: The requirements.txt should contain pan-os-upgrade==0.2.2 | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Set the locale to avoid issues with emoji rendering | ||
ENV LANG C.UTF-8 | ||
|
||
# Run the application | ||
CMD ["pan-os-upgrade"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pan-os-upgrade==0.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.