Skip to content

Commit

Permalink
Merge pull request #111 from cdot65/110-pan-os-upgrade-panorama-licen…
Browse files Browse the repository at this point in the history
…sing-checksoftware-download-check

add Panorama license check
  • Loading branch information
cdot65 authored Mar 16, 2024
2 parents 491ef97 + c1ae09d commit a3f933c
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 70 deletions.
24 changes: 24 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"cSpell.words": [
"adminpassword",
"apikey",
"apipassword",
"apiuser",
"argparse",
"auditability",
"docstrings",
"dynaconf",
"failovers",
"highavailability",
"hostnames",
"proxied",
"Pydantic",
"pyproject",
"pytest",
"refreshall",
"typer",
"Typer",
"unsynchronized",
"Xapi"
]
}
15 changes: 12 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
# trunk-ignore-all(terrascan/AC_DOCKER_0047)
# 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
RUN apk add --no-cache gcc=13.2.1_git20231014-r0 musl-dev=1.2.4_git20230717-r4 libffi-dev=3.4.4-r3 make=4.4.1-r2

# Set the working directory in the container to /app
WORKDIR /app

# Add settings.yaml to the container at /app
ADD settings.yaml /app
COPY settings.yaml /app

# Install any needed packages specified in requirements.txt
# Note: The requirements.txt should contain pan-os-upgrade==1.3.4
# Note: The requirements.txt should contain pan-os-upgrade==1.3.5
RUN pip install --no-cache-dir pan-os-upgrade==1.3.4

# Set the locale to avoid issues with emoji rendering
ENV LANG C.UTF-8

# Create a non-root user
RUN adduser -D panadmin
USER panadmin

# Define the entry point for the application
ENTRYPOINT ["pan-os-upgrade"]

# By default, show the help message if no arguments are provided
CMD ["--help"]

# Add a healthcheck
HEALTHCHECK --interval=30s --timeout=5s \
CMD pgrep -f "pan-os-upgrade" > /dev/null || exit 1
Loading

0 comments on commit a3f933c

Please sign in to comment.