File tree 2 files changed +40
-12
lines changed
2 files changed +40
-12
lines changed Original file line number Diff line number Diff line change 4
4
## alpine
5
5
` nano Dockerfile `
6
6
``` dockerfile
7
- FROM nginx:stable-alpine3.17-slim
7
+ FROM alpine:3.18
8
8
9
9
RUN apk add bash
10
10
@@ -28,6 +28,7 @@ COPY --chown=d_user --chmod=550 ./src /usr/share/nginx/html
28
28
```
29
29
30
30
31
+
31
32
## python
32
33
Debian 13: ` trixie `
33
34
Debian 12: ` bookworm `
@@ -102,6 +103,31 @@ COPY --from=build --chown=d_user --chmod=500 /home/d_dir /home/d_python
102
103
```
103
104
104
105
106
+ ## Minimal Python
107
+ ``` dockerfile
108
+ # FROM python:3.11-slim-bullseye
109
+ FROM python:3.7-alpine as base
110
+
111
+ FROM base as builder
112
+
113
+ RUN mkdir /install
114
+ WORKDIR /install
115
+
116
+ COPY requirements.txt /requirements.txt
117
+
118
+ RUN pip install --install-option="--prefix=/install" -r /requirements.txt
119
+
120
+ FROM base
121
+
122
+ COPY --from=builder /install /usr/local
123
+ COPY src /app
124
+
125
+ WORKDIR /app
126
+
127
+ CMD ["gunicorn" , "-w 4" , "main:app" ]
128
+ ```
129
+
130
+
105
131
## build - push
106
132
``` bash
107
133
docker image build -t asim3/my_image:latest .
Original file line number Diff line number Diff line change 1
1
## Official Images
2
- [ node] ( https://hub.docker.com/_/node )
3
- [ busybox] ( https://hub.docker.com/_/busybox )
4
- [ alpine] ( https://hub.docker.com/_/alpine )
5
- [ django] ( https://hub.docker.com/_/django )
6
- [ php] ( https://hub.docker.com/_/php )
7
- [ wordpress] ( https://hub.docker.com/_/wordpress )
8
- [ debian] ( https://hub.docker.com/_/debian )
9
- [ python] ( https://hub.docker.com/_/python )
10
- [ docker] ( https://hub.docker.com/_/docker )
11
- [ httpd] ( https://hub.docker.com/_/httpd )
12
- [ ubuntu] ( https://hub.docker.com/_/ubuntu )
2
+ [ alpine] ( https://hub.docker.com/_/alpine/tags )
3
+ [ busybox] ( https://hub.docker.com/_/busybox/tags )
4
+ [ python] ( https://hub.docker.com/_/python/tags )
13
5
14
6
7
+ [ docker] ( https://hub.docker.com/_/docker/tags )
8
+ [ debian] ( https://hub.docker.com/_/debian/tags )
9
+ [ ubuntu] ( https://hub.docker.com/_/ubuntu/tags )
10
+
11
+
12
+ [ node] ( https://hub.docker.com/_/node/tags )
13
+ [ httpd] ( https://hub.docker.com/_/httpd/tags )
14
+ [ php] ( https://hub.docker.com/_/php/tags )
15
+ [ wordpress] ( https://hub.docker.com/_/wordpress/tags )
16
+
15
17
16
18
[ Environment replacement] ( https://docs.docker.com/engine/reference/builder/#environment-replacement )
17
19
You can’t perform that action at this time.
0 commit comments