Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the default image command to hello #6

Merged
merged 1 commit into from
Aug 26, 2024
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
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