Skip to content

Commit 8f2a554

Browse files
committed
Split out "copy_packages" template file
1 parent 7c8867b commit 8f2a554

File tree

2 files changed

+11
-41
lines changed

2 files changed

+11
-41
lines changed

templates/copy_packages.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Copy Just the Packages
2+
{% set short_repository = repository.split("/")[1] -%}
3+
4+
It's also possible to copy just the Python packages themselves. This is particularly useful when you want to use the precompiled libraries from multiple containers.
5+
6+
```dockerfile
7+
FROM python:{{ python_versions|last }}
8+
9+
COPY --from=ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-slim-LATEST /usr/local/lib/python{{ python_versions|last }}/site-packages/* /usr/local/lib/python{{ python_versions|last }}/site-packages/
10+
COPY --from=ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-slim-LATEST /opt/oso /opt/oso
11+
```

templates/quick_start.md

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +0,0 @@
1-
## Quick Start
2-
{% set short_repository = repository.split("/")[1] -%}
3-
4-
### Full
5-
6-
To pull the latest slim version:
7-
8-
```bash
9-
docker pull ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-LATEST
10-
```
11-
12-
To include it in the dockerfile instead:
13-
14-
```dockerfile
15-
FROM ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-LATEST
16-
```
17-
18-
### Slim
19-
20-
To pull the latest slim version:
21-
22-
```bash
23-
docker pull ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-slim-LATEST
24-
```
25-
26-
To include it in the dockerfile instead:
27-
28-
```dockerfile
29-
FROM ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-slim-LATEST
30-
```
31-
32-
### Copy Just the Packages
33-
34-
It's also possible to copy just the Python packages themselves. This is particularly useful when you want to use the precompiled libraries from multiple containers.
35-
36-
```dockerfile
37-
FROM python:{{ python_versions|last }}
38-
39-
COPY --from=ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-slim-LATEST /usr/local/lib/python{{ python_versions|last }}/site-packages/* /usr/local/lib/python{{ python_versions|last }}/site-packages/
40-
COPY --from=ghcr.io/{{ organization }}/{{ short_repository }}:py{{ python_versions|last }}-slim-LATEST /opt/oso /opt/oso
41-
```

0 commit comments

Comments
 (0)