File tree 3 files changed +18
-9
lines changed
3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 55
55
docker image ls -a
56
56
57
57
- name : Test image
58
- run : ./run.sh hello
58
+ run : ./run.sh
Original file line number Diff line number Diff line change @@ -18,3 +18,6 @@ RUN uv sync --frozen
18
18
19
19
# Place executables in the environment at the front of the path
20
20
ENV PATH="/app/.venv/bin:$PATH"
21
+
22
+ # Set the default command to the application
23
+ CMD ["hello" ]
Original file line number Diff line number Diff line change @@ -11,29 +11,35 @@ A [`run.sh`](./run.sh) utility is provided for quickly building the image and st
11
11
This script demonstrates best practices for developing using the container, using bind mounts for
12
12
the project and virtual environment directories.
13
13
14
- To run the application in a container:
14
+ To run the application in the container:
15
15
16
16
``` console
17
- $ ./run.sh hello
17
+ $ ./run.sh
18
18
```
19
19
20
- To enter a Python REPL in a container:
20
+ To run the application in the container, checking if the environment is up-to-date first :
21
21
22
22
``` console
23
- $ ./run.sh
23
+ $ ./run.sh uv run hello
24
+ ```
25
+
26
+ To check that the environment is up-to-date:
27
+
28
+ ``` console
29
+ $ ./run.sh uv sync --frozen
30
+ Audited 2 packages ...
24
31
```
25
32
26
- To enter a ` bash ` shell in a container:
33
+ To enter a ` bash ` shell in the container:
27
34
28
35
``` console
29
36
$ ./run.sh /bin/bash
30
37
```
31
38
32
- To check that the environment is up-to-date :
39
+ To build the image without running anything :
33
40
34
41
``` console
35
- $ ./run.sh uv sync --frozen
36
- Audited 2 packages ...
42
+ $ docker build .
37
43
```
38
44
39
45
## Project overview
You can’t perform that action at this time.
0 commit comments