Skip to content

Instantly share code, notes, and snippets.

@sostenesapollo
sostenesapollo / Ubuntu 16.04
Created June 20, 2024 13:50 — forked from dhoeric/Ubuntu 16.04
install-docker-aws-ec2-user-data
#!/bin/bash
# Install docker
apt-get update
apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
apt-get update

A simple Docker and Docker Compose install script for Ubuntu

Usage

  1. sh install-docker.sh
  2. log out
  3. log back in

Links

@sostenesapollo
sostenesapollo / install-docker.sh Install docker with a single command in digital ocean
#!/bin/sh
set -o errexit
set -o nounset
IFS=$(printf '\n\t')
# Docker
sudo apt remove --yes docker docker-engine docker.io containerd runc || true
sudo apt update