瀏覽代碼

Use apt-get instead of apt in Dockerfiles, also --no-install-recommends

apt is intended for humans, not scripts.

--no-install-recommends improves build time by avoiding to install
unneeded packages.
Robin Schneider 6 年之前
父節點
當前提交
f8e49ea3f4

+ 3 - 2
docker/Dockerfile.j2

@@ -45,8 +45,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 {% endif %}

+ 3 - 2
docker/aarch64/mysql/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/aarch64/sqlite/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/amd64/mysql/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/amd64/postgresql/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/amd64/sqlite/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/armv6/mysql/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/armv6/sqlite/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/armv7/mysql/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar
 

+ 3 - 2
docker/armv7/sqlite/Dockerfile

@@ -16,8 +16,9 @@ ARG TERM=xterm-256color
 
 RUN echo $TERM
 
-RUN apt update -y \
-    && apt install -y \
+RUN apt-get update \
+    && apt-get install -y \
+        --no-install-recommends \
         curl \
         tar