diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..615f5ad --- /dev/null +++ b/.dockerignore @@ -0,0 +1,50 @@ +# Docker +docker-compose.yml +.docker + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg +**/__pycache__ +**/*.py[cod] + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.cache +nosetests.xml +coverage.xml + +# Virtual environment +.env/ +.venv/ +venv/ +venv3/ + +*.cover +*.log +.git +.mypy_cache +.pytest_cache +.hypothesis +.idea + +**/*.swp \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0de6dcb..abf5443 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -91,6 +91,7 @@ jobs: context: . file: ./Dockerfile platforms: linux/amd64,linux/arm64 + target: deploy push: ${{ steps.prep.outputs.publish_image }} tags: ${{ steps.prep.outputs.tags }} labels: | diff --git a/Dockerfile b/Dockerfile index fa4c692..bc14714 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,7 @@ RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel COPY --chown=craftbeerpi ./requirements.txt /cbpi-src/ RUN pip3 install --no-cache-dir -r /cbpi-src/requirements.txt +FROM base as deploy # Install craftbeerpi from source COPY --chown=craftbeerpi . /cbpi-src RUN pip3 install --no-cache-dir /cbpi-src