Skip to content

Commit

Permalink
Add more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Aug 26, 2024
1 parent 178517a commit 6abc20c
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ An example project for using uv in Dockerfiles.

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

## Running the image
## Trying it out

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

Expand All @@ -28,3 +28,35 @@ To enter a `bash` shell in the image:
```
./run.sh /bin/bash
```

## Project overview

### Dockerfile

The [`Dockerfile`](./Dockerfile) defines the image and includes:

- Installation of uv
- Installing the project dependencies and the project separately for optimal image build caching
- Placing environment executables on the `PATH`

### Docker ignore file

The [`.dockerignore`](./.dockerignore) file includes an entry for the `.venv` directory to ensure the
`.venv` is not included in image builds. Note that the `.dockerignore` file is not applied to volume
mounts during container runs.

### Run script

The [run script](./run.sh) includes an example of invoking `docker run` for local development,
mounting the source code for the project into the container so that edits are reflected immediately.

### Application code

The Python application code for the project is at
[`src/uv_docker_example/__init__.py`](./src/uv_docker_example/__init__.py) — it just prints hello
world.

### Project definition

The project at [`pyproject.toml`](./pyproject.toml) includes includes Ruff as an example development
dependency and defines a `hello` entrypoint for the application.

0 comments on commit 6abc20c

Please sign in to comment.