Skip to content

Commit

Permalink
Change the default image command to hello (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Aug 26, 2024
1 parent b14ddd8 commit fe0075e
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
docker image ls -a
- name: Test image
run: ./run.sh hello
run: ./run.sh
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ RUN uv sync --frozen

# Place executables in the environment at the front of the path
ENV PATH="/app/.venv/bin:$PATH"

# Set the default command to the application
CMD ["hello"]
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,35 @@ A [`run.sh`](./run.sh) utility is provided for quickly building the image and st
This script demonstrates best practices for developing using the container, using bind mounts for
the project and virtual environment directories.

To run the application in a container:
To run the application in the container:

```console
$ ./run.sh hello
$ ./run.sh
```

To enter a Python REPL in a container:
To run the application in the container, checking if the environment is up-to-date first:

```console
$ ./run.sh
$ ./run.sh uv run hello
```

To check that the environment is up-to-date:

```console
$ ./run.sh uv sync --frozen
Audited 2 packages ...
```

To enter a `bash` shell in a container:
To enter a `bash` shell in the container:

```console
$ ./run.sh /bin/bash
```

To check that the environment is up-to-date:
To build the image without running anything:

```console
$ ./run.sh uv sync --frozen
Audited 2 packages ...
$ docker build .
```

## Project overview
Expand Down

0 comments on commit fe0075e

Please sign in to comment.