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
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
zip \
&& rm -rf /var/lib/apt/lists/*

# Install Python 3.11 and pip in a dedicated layer
# hadolint ignore=DL3008
RUN apt-get update && apt-get install -y --no-install-recommends \
python3.11 \
python3.11-venv \
python3.11-distutils \
python3-pip \
ffmpeg \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 || true \
&& ln -sf /usr/bin/pip3 /usr/bin/pip || true \
&& ln -sf /usr/bin/python3.11 /usr/bin/python || true \
&& rm -rf /var/lib/apt/lists/*

RUN npm install -g "@openai/codex@${CODEX_CLI_VERSION}"

USER ${USERNAME}
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ TAG ?= dev
IMAGE_REF := $(IMAGE):$(TAG)
DOCKERFILE ?= Dockerfile
CONTEXT ?= .
CODEX_CLI_VERSION ?= latest

.PHONY: build clean

build:
docker build -t $(IMAGE_REF) -f $(DOCKERFILE) $(CONTEXT)
docker build \
-t $(IMAGE_REF) \
-f $(DOCKERFILE) \
--build-arg CODEX_CLI_VERSION=$(CODEX_CLI_VERSION) \
$(CONTEXT)

clean:
@echo "Removing image $(IMAGE_REF) if it exists..."
Expand Down