Skip to content

Commit ed8370e

Browse files
authored
Add more documentation (#3)
1 parent 178517a commit ed8370e

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

+33-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ An example project for using uv in Dockerfiles.
44

55
See the [uv Docker integration guide](https://docs.astral.sh/uv/guides/integration/docker/) for more details.
66

7-
## Running the image
7+
## Trying it out
88

99
A [`run.sh`](./run.sh) utility is provided for quickly building the image and starting a container.
1010

@@ -28,3 +28,35 @@ To enter a `bash` shell in the image:
2828
```
2929
./run.sh /bin/bash
3030
```
31+
32+
## Project overview
33+
34+
### Dockerfile
35+
36+
The [`Dockerfile`](./Dockerfile) defines the image and includes:
37+
38+
- Installation of uv
39+
- Installing the project dependencies and the project separately for optimal image build caching
40+
- Placing environment executables on the `PATH`
41+
42+
### Docker ignore file
43+
44+
The [`.dockerignore`](./.dockerignore) file includes an entry for the `.venv` directory to ensure the
45+
`.venv` is not included in image builds. Note that the `.dockerignore` file is not applied to volume
46+
mounts during container runs.
47+
48+
### Run script
49+
50+
The [run script](./run.sh) includes an example of invoking `docker run` for local development,
51+
mounting the source code for the project into the container so that edits are reflected immediately.
52+
53+
### Application code
54+
55+
The Python application code for the project is at
56+
[`src/uv_docker_example/__init__.py`](./src/uv_docker_example/__init__.py) — it just prints hello
57+
world.
58+
59+
### Project definition
60+
61+
The project at [`pyproject.toml`](./pyproject.toml) includes includes Ruff as an example development
62+
dependency and defines a `hello` entrypoint for the application.

0 commit comments

Comments
 (0)