Skip to content

Instantly share code, notes, and snippets.

@vsilverman
Last active December 14, 2020 21:14
Show Gist options
  • Save vsilverman/2b68ae33dcd467f72c379abb0b06cb87 to your computer and use it in GitHub Desktop.
Save vsilverman/2b68ae33dcd467f72c379abb0b06cb87 to your computer and use it in GitHub Desktop.
Dockerfile snippets - How-To Install Docker CLI, etc.
...
# Docker install
USER root
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg > /tmp/dkey
RUN apt-key add /tmp/dkey
RUN add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable"
RUN apt-get update && apt-get install -y docker-ce-cli
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment