Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

steps:
- name: ":python:"
command: "py.test"
command: uv run py.test
plugins:
- docker-compose#v5.2.0:
run: app
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM python
RUN pip install pipenv
FROM ghcr.io/astral-sh/uv:python3.13-alpine
COPY . /app
WORKDIR /app
RUN pipenv install --deploy --dev
ENV SHELL=/bin/bash
ENTRYPOINT ["pipenv", "run"]
CMD ["python"]
RUN uv sync
CMD ["uv", "run", "python"]
12 changes: 0 additions & 12 deletions Pipfile

This file was deleted.

68 changes: 0 additions & 68 deletions Pipfile.lock

This file was deleted.

8 changes: 4 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Buildkite Python Docker Example (using pipenv)
# Buildkite Python Docker Example (using uv)

[![Add to Buildkite](https://buildkite.com/button.svg)](https://buildkite.com/new)

This repository is an example on how to test a [Python](https://python.org) project using [Buildkite](https://buildkite.com/), [Docker](https://www.docker.com/) and [pipenv](https://github.com/kennethreitz/pipenv).
This repository is an example on how to test a [Python](https://python.org) project using [Buildkite](https://buildkite.com/), [Docker](https://www.docker.com/) and [uv](https://docs.astral.sh/uv/).

## How does it work?

* The [Dockerfile](Dockerfile) sets up the pipenv environment, and installs the dependencies
* The [Dockerfile](Dockerfile) sets up the uv environment, and installs the dependencies
* The [docker-compose.yml](docker-compose.yml) defines the 'app' Docker service and how it should be built
* The [pipeline.yml](.buildkite/pipeline.yml) runs the command using Docker Compose

## License

See [Licence.md](Licence.md) (MIT)
See [Licence.md](Licence.md) (MIT)
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "python-docker-example"
version = "0.1.0"
description = ""
readme = "README.md"
authors = [
{ name = "Builkdite Developers", email = "dev@buildkite.com" }
]
requires-python = ">=3.13"
dependencies = []

[dependency-groups]
dev = [
"pytest>=8.3.5",
]
2 changes: 2 additions & 0 deletions src/python_docker_example/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def main() -> None:
print("Hello from python-docker-example!")
69 changes: 69 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.