Skip to content

Commit

Permalink
Update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Lubken committed Aug 20, 2024
1 parent d04209b commit 25bb142
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ sdist
# venv
.env
.venv
.py37
.py38
.py39
.py310
.py311
.py312

# mac
.DS_Store
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
build-wheel:
volumes:
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.8"

services:
test:
build:
Expand Down
14 changes: 7 additions & 7 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG PYTHON_VERSION="3.10"
ARG PYTHON_VERSION="3.12"
ARG ROOT_CONTAINER=python:${PYTHON_VERSION}-slim-bullseye


FROM ${ROOT_CONTAINER} as binaries
FROM ${ROOT_CONTAINER} AS binaries
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
USER root
WORKDIR /tmp
Expand All @@ -22,25 +22,25 @@ RUN \
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]


FROM binaries as source
FROM binaries AS source
COPY . .


FROM source as pre-commit
FROM source AS pre-commit
RUN \
pip install ".[dev]"
CMD pre-commit run --all-files


FROM source as test
FROM source AS test
RUN \
pip install ".[dev]"
CMD pytest


FROM source as build-wheel
FROM source AS build-wheel
CMD pip wheel --no-deps -w ./dist .


FROM binaries as install-wheel
FROM binaries AS install-wheel
CMD pip install --find-links=./dist cfgenvy[dev]
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Setup virtual environment:

Or setup homebrew environment:

brew install python@3.10
/opt/homebrew/Cellar/python@3.10/.../Frameworks/Python.framework/Versions/Current/python@3.10 -m venv .venv
brew install python@3.12
python3.12 -m venv .venv

Once virtual environment is setup:

Expand Down

0 comments on commit 25bb142

Please sign in to comment.