mirror of
https://github.com/bckelley/tconnectsync.git
synced 2026-08-24 03:34:12 -05:00
dockerfile: fix build
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user