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 cc761d4
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 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,32 @@ To enter a `bash` shell in the image:
```
./run.sh /bin/bash
```

## Project overview

### Dockerfile

The [Dockerfile](./Dockerfile) includes:

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

### .dockerignore

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.sh

An example of invocking `docker run` for local development, mounting the source code for the project
into the container so that edits are reflected immediately.

### `src/uv_docker_example/__init__.py`

The entire source code for the application — prints hello world.

### pyproject.toml

The project definition.

0 comments on commit cc761d4

Please sign in to comment.