Skip to content
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
7 changes: 6 additions & 1 deletion build_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import pkg_resources
import yaml

DEFAULT_PYTHON_IMAGE = (
"python:3.8-bullseye@sha256:e1cd369204123e89646f8c001db830eddfe3e381bd5c837df00141be3bd754cb"
)
BASE_DOCKERFILE = "base.Dockerfile"
FINISH_DOCKERFILE = "finish.Dockerfile"

Expand All @@ -33,6 +36,7 @@ class OfrakImageConfig:
install_target: InstallTarget
cache_from: List[str]
entrypoint: Optional[str]
python_image: str

def validate_serial_txt_existence(self):
"""
Expand Down Expand Up @@ -171,6 +175,7 @@ def parse_args() -> OfrakImageConfig:
InstallTarget(args.target),
args.cache_from,
config_dict.get("entrypoint"),
config_dict.get("python_image", DEFAULT_PYTHON_IMAGE),
)
image_config.validate_serial_txt_existence()
return image_config
Expand Down Expand Up @@ -207,7 +212,7 @@ def create_dockerfile_base(config: OfrakImageConfig) -> str:
dockerfile_base_parts += [f"### {dockerstage_path}", dockerstub]

dockerfile_base_parts += [
"FROM python:3.8-bullseye@sha256:e1cd369204123e89646f8c001db830eddfe3e381bd5c837df00141be3bd754cb",
f"FROM {config.python_image}",
"",
]

Expand Down
6 changes: 0 additions & 6 deletions ofrak_core/Dockerstub
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,6 @@ RUN cd /tmp && \
cd /tmp && \
rm -r squashfs-tools

# Install Jefferson
WORKDIR /tmp
RUN wget https://bootstrap.pypa.io/pip/get-pip.py && python3.9 get-pip.py && python3.8 get-pip.py && rm get-pip.py
RUN python3.9 -m pip install jefferson
WORKDIR /

# Install UEFIExtract (build from source, pinned to releae A68)
RUN cd /tmp && \
wget https://github.com/LongSoft/UEFITool/archive/refs/tags/A68.zip && \
Expand Down