Skip to content

Commit

Permalink
dind make task runnable again
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderankin committed Jun 28, 2024
1 parent 8045a80 commit 5fbeef9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
22 changes: 15 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
ARG PYTHON_VERSION
FROM python:${version}-slim-bookworm
FROM python:${PYTHON_VERSION}-slim-bookworm

WORKDIR /workspace
RUN pip install --upgrade pip \
&& apt-get update \
&& apt-get install -y \
freetds-dev \
&& rm -rf /var/lib/apt/lists/*
&& apt-get install -y freetds-dev \
&& apt-get install -y make \
# no real need for keeping this image small at the moment
&& :; # rm -rf /var/lib/apt/lists/*

# install requirements we exported from poetry
COPY build/requirements.txt requirements.txt
RUN pip install -r requirements.txt
# install poetry
RUN bash -c 'python -m venv /opt/poetry-venv && source $_/bin/activate && pip install poetry && ln -s $(which poetry) /usr/bin'

# install dependencies with poetry
COPY pyproject.toml .
COPY poetry.lock .
RUN poetry install --all-extras --with dev --no-root

# copy project source
COPY . .

# install project with poetry
RUN poetry install --all-extras --with dev
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ lint: ## Lint all files in the project, which we also run in pre-commit
poetry run pre-commit run -a

image: ## Make the docker image for dind tests
poetry export -f requirements.txt -o build/requirements.txt
docker build --build-arg PYTHON_VERSION=${PYTHON_VERSION} -t ${IMAGE} .

DOCKER_RUN = docker run --rm -v /var/run/docker.sock:/var/run/docker.sock
Expand Down

0 comments on commit 5fbeef9

Please sign in to comment.