Browse Source

Add code to install docker client into docker image

Valentino Lauciani 4 years ago
parent
commit
a00364bf01
1 changed files with 15 additions and 0 deletions
  1. 15 0
      workspace/Dockerfile

+ 15 - 0
workspace/Dockerfile

@@ -1208,6 +1208,21 @@ RUN if [ ${INSTALL_SSHPASS} = true ]; then \
     apt-get -y install sshpass \
 ;fi
 
+###########################################################################
+# Docker Client:
+###########################################################################
+
+USER root
+
+ARG INSTALL_DOCKER_CLIENT=false
+
+RUN if [ ${INSTALL_DOCKER_CLIENT} = true ]; then \
+    curl -sS https://download.docker.com/linux/static/stable/x86_64/docker-20.10.3.tgz -o /tmp/docker.tar.gz && \
+    tar -xzf /tmp/docker.tar.gz -C /tmp/ && \
+    cp /tmp/docker/docker* /usr/local/bin && \
+    chmod +x /usr/local/bin/docker* \
+;fi
+
 ###########################################################################
 # YAML: extension for PHP-CLI
 ###########################################################################