dockerfile: fix build

This commit is contained in:
James Woglom
2021-10-20 01:01:47 -04:00
parent d931242562
commit bcd486561f
2 changed files with 7 additions and 6 deletions
+2 -3
View File
@@ -4,8 +4,8 @@ on:
branches: [ master ]
jobs:
publish-pypi:
name: Publish to PyPI
build-binary:
name: Build Binary and Publish to PyPI
runs-on: ubuntu-latest
steps:
@@ -30,7 +30,6 @@ jobs:
--outdir dist/
.
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
+5 -3
View File
@@ -15,20 +15,22 @@ FROM base AS python-deps
RUN pip install pipenv
RUN apt-get update && apt-get install -y --no-install-recommends gcc
RUN mkdir -p /base
WORKDIR /base
# Install python dependencies in /.venv
COPY Pipfile .
COPY Pipfile.lock .
COPY setup.cfg .
COPY setup.py .
COPY pyproject.toml .
COPY tconnectsync .
RUN PIPENV_VENV_IN_PROJECT=1 pipenv install --deploy
FROM base AS runtime
# Copy virtualenv from python-deps stage
COPY --from=python-deps /.venv /.venv
ENV PATH="/.venv/bin:$PATH"
COPY --from=python-deps /base/.venv /base/.venv
ENV PATH="/base/.venv/bin:$PATH"
# Create and switch to a new user
RUN useradd --create-home appuser