-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #244 from callowayproject/docker-image
Changed dependency manager to uv and added Docker image
- Loading branch information
Showing
6 changed files
with
2,391 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.* | ||
bump_my_version.egg-info/ | ||
docs/ | ||
overrides/ | ||
test-reports/ | ||
tests/ | ||
tools/ | ||
*.yaml | ||
CODEOWNERS | ||
Dockerfile | ||
Makefile | ||
MANIFEST.in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim AS builder | ||
|
||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy | ||
|
||
WORKDIR /app | ||
|
||
COPY pyproject.toml /app/pyproject.toml | ||
COPY uv.lock /app/uv.lock | ||
|
||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
# --mount=type=bind,source=uv.lock,target=uv.lock \ | ||
# --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ | ||
uv sync --frozen --no-install-project --no-dev | ||
COPY . /app | ||
RUN --mount=type=cache,target=/root/.cache/uv \ | ||
uv sync --frozen --no-dev | ||
|
||
FROM python:3.12-slim-bookworm | ||
|
||
ARG USERNAME=app | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
LABEL org.opencontainers.image.authors="Calloway Project https://github.com/callowayproject" | ||
LABEL org.opencontainers.image.created=2024-10-12T09:38:00Z | ||
LABEL org.opencontainers.image.url=https://github.com/callowayproject/bump-my-version | ||
LABEL org.opencontainers.image.documentation=https://callowayproject.github.io/bump-my-version | ||
LABEL org.opencontainers.image.source=https://github.com/callowayproject/bump-my-version | ||
LABEL org.opencontainers.image.version=0.27.0 | ||
LABEL org.opencontainers.image.licenses=MIT | ||
|
||
# Add a non-root user and group | ||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME | ||
|
||
COPY --from=builder --chown=$USER_UID:$USER_GID /app /app | ||
USER $USERNAME | ||
WORKDIR /project | ||
|
||
# Place executables in the environment at the front of the path | ||
ENV PATH="/app/.venv/bin:$PATH" | ||
|
||
ENTRYPOINT ["bump-my-version"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
"""Top-level package for bump-my-version.""" | ||
|
||
__version__: str = "0.27.0" | ||
__version__ = "0.27.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.