瀏覽代碼

Upgrade Dockerfile to use requirements.txt and clean up some packages

master
Ricardo Branco 6 年之前
父節點
當前提交
5db6353e8c
共有 1 個文件被更改,包括 16 次插入2 次删除
  1. 16
    2
      Dockerfile

+ 16
- 2
Dockerfile 查看文件

@@ -1,8 +1,22 @@
1 1
 FROM	registry:2
2 2
 
3
-RUN	apk --no-cache add python3 python3-dev
3
+COPY	requirements.txt /tmp
4 4
 
5
-RUN	pip3 install --no-cache-dir docker docker[tls] pyyaml
5
+RUN	apk --no-cache add \
6
+		gcc \
7
+		libc-dev \
8
+		libffi-dev \
9
+		openssl-dev \
10
+		python3-dev \
11
+		python3 && \
12
+	pip3 install --no-cache-dir --upgrade pip && \
13
+	pip3 install --no-cache-dir -r /tmp/requirements.txt && \
14
+	apk del \
15
+		gcc \
16
+		libc-dev \
17
+		libffi-dev \
18
+		openssl-dev \
19
+		python3-dev
6 20
 
7 21
 COPY	clean_registry.py /usr/local/bin/clean_registry.py
8 22
 

Loading…
取消
儲存