Create reusable runner image build action
This commit is contained in:
26
runner-image/Dockerfile
Normal file
26
runner-image/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
git \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
tzdata && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ARG REQUIREMENTS_FILE=requirements.lock
|
||||
COPY ${REQUIREMENTS_FILE} /tmp/requirements.lock
|
||||
|
||||
RUN python3 -m venv /opt/runner-venv && \
|
||||
/opt/runner-venv/bin/pip install --no-cache-dir -r /tmp/requirements.lock && \
|
||||
/opt/runner-venv/bin/pip check && \
|
||||
rm /tmp/requirements.lock
|
||||
|
||||
ENV PATH="/opt/runner-venv/bin:$PATH" \
|
||||
PYTHONDONTWRITEBYTECODE="1" \
|
||||
PYTHONUNBUFFERED="1"
|
||||
|
||||
CMD ["bash"]
|
||||
Reference in New Issue
Block a user