feat(docker): Add docker image
This commit is contained in:
parent
f31c59da5b
commit
f394a853c1
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@ -70,3 +70,11 @@ jobs:
|
|||||||
path: dist
|
path: dist
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
|
||||||
|
create_docker:
|
||||||
|
name: Create Docker Image
|
||||||
|
needs: create_release
|
||||||
|
if: ${{ needs.create_release.outputs.success == 'true' }}
|
||||||
|
uses: luketainton/gha-workflows/.github/workflows/build-push-attest-docker.yml@main
|
||||||
|
with:
|
||||||
|
release: ${{ needs.create_release.outputs.release_name }}
|
||||||
|
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FROM python:3.11-slim
|
||||||
|
LABEL maintainer="Luke Tainton <luke@tainton.uk>"
|
||||||
|
LABEL org.opencontainers.image.source="https://github.com/luketainton/pypilot"
|
||||||
|
USER root
|
||||||
|
|
||||||
|
ENV PYTHONPATH="/run:/usr/local/lib/python3.11/lib-dynload:/usr/local/lib/python3.11/site-packages:/usr/local/lib/python3.11"
|
||||||
|
WORKDIR /run
|
||||||
|
|
||||||
|
RUN mkdir -p /.local && \
|
||||||
|
chmod -R 777 /.local && \
|
||||||
|
pip install -U pip poetry
|
||||||
|
|
||||||
|
COPY pyproject.toml /run/pyproject.toml
|
||||||
|
COPY poetry.lock /run/poetry.lock
|
||||||
|
|
||||||
|
RUN poetry config virtualenvs.create false && \
|
||||||
|
poetry install --without dev
|
||||||
|
|
||||||
|
ENTRYPOINT ["python3", "-B", "-m", "app.main"]
|
||||||
|
|
||||||
|
ARG version="dev"
|
||||||
|
ENV APP_VERSION=$version
|
||||||
|
|
||||||
|
COPY ipilot /run/app
|
Loading…
x
Reference in New Issue
Block a user