diff --git a/README.md b/README.md index c18721d..deeea74 100644 --- a/README.md +++ b/README.md @@ -13,4 +13,4 @@ As part of this work, we do the following: Docker Hub repository: [https://hub.docker.com/r/d33bs/wintry](https://hub.docker.com/r/d33bs/wintry) -Source code: [https://github.com/d33bs/demo-poetry-dynamic-semver-with-docker-hub-push](https://github.com/d33bs/demo-poetry-dynamic-semver-with-docker-hub-push) +Source code: [https://github.com/d33bs/demo-poetry-dynamic-semver-with-docker-hub-push](https://github.com/CU-DBMI/demo-poetry-dynamic-semver-with-docker-hub-push) diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 165f15c..270e97e 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -1,24 +1,31 @@ FROM python:3 +# set various metadata, loosely following biocontainers standards from: +# https://biocontainers-edu.readthedocs.io/en/latest/what_is_biocontainers.html LABEL base_image="python:3" LABEL software="wintry" LABEL about.summary="An example project leveraging various automation." -LABEL about.home="https://github.com/d33bs/test-semver-docker-deploy" -LABEL about.documentation="https://github.com/d33bs/test-semver-docker-deploy" -LABEL about.license_file="https://github.com/d33bs/test-semver-docker-deploy/LICENSE" +LABEL about.home="https://github.com/CU-DBMI/demo-poetry-dynamic-semver-with-docker-hub-push" +LABEL about.documentation="https://github.com/CU-DBMI/demo-poetry-dynamic-semver-with-docker-hub-push" +LABEL about.license_file="https://github.com/CU-DBMI/demo-poetry-dynamic-semver-with-docker-hub-push/blob/main/LICENSE" LABEL about.license="SPDX:BSD-3-Clause" -LABEL about.tags="general" -WORKDIR /usr/src/app +# set the workdir to /app +WORKDIR /app +# copy pyproject and poetry lockfile for stepped installation COPY pyproject.toml poetry.lock ./ +# install poetry and poetry dynamic versioning # hadolint ignore=DL3013 RUN pip install --no-cache-dir poetry poetry-dynamic-versioning +# copy the rest of the repository COPY . . +# install the project from poetry RUN poetry install --no-interaction +# set an alias for running python through the poetry env # hadolint ignore=DL3059 RUN echo 'alias python="poetry run python"' >> ~/.bashrc