Skip to content

Commit

Permalink
Update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Lubken authored and jlubken committed Aug 20, 2024
1 parent c5acd8b commit e240a78
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 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
12 changes: 6 additions & 6 deletions dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG PYTHON_VERSION="3.10"
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/[email protected]/.../Frameworks/Python.framework/Versions/Current/[email protected] -m venv .venv
brew install python@3.12
python3.12 -m venv .venv

Once virtual environment is setup:

Expand Down

0 comments on commit e240a78

Please sign in to comment.