Skip to content

Commit

Permalink
Special alpine worker support for unconventional responders
Browse files Browse the repository at this point in the history
  • Loading branch information
nusantara-self committed Feb 11, 2025
1 parent 4d4e762 commit 7fc2b3a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,20 @@ def build(dockerfile):
# Define the base images to try, in order
base_images = ["python:3-alpine", "python:3-slim", "python:3"]
last_exception = None

# List of workers that need a special Alpine setup to support libmagic
# --> not developped correctly to support single Dockerfile in repository (multiple .py entrypoint file)
special_alpine_workers = ["PaloAltoNGFW"]

for base in base_images:
# For Alpine, add extra APK commands to install required tools
if base.startswith("python:3-alpine"):
#alpine_setup = (
# "RUN apk update && apk upgrade && apk add --no-cache --update py3-pip && rm -rf /var/cache/apk/*\n"
#)
alpine_setup = ""
if worker_name in special_alpine_workers:
# Specific alpine setup to support libmagic
alpine_setup = "RUN apk add --no-cache file-dev && rm -rf /var/cache/apk/*\n"
else:
# Regular Alpine setup (if needed)
alpine_setup = ""
else:
alpine_setup = ""

Expand Down

0 comments on commit 7fc2b3a

Please sign in to comment.