mirror of
https://github.com/pgrondek/config.git
synced 2024-11-22 03:53:43 +00:00
[docker] Create makefile for installing docker
This commit is contained in:
parent
fcbb957adc
commit
18354079ee
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
SUB_DIRS=bash i3 packages ssh vim
|
||||
SUB_DIRS=bash i3 packages ssh vim docker
|
||||
|
||||
.PHONY: clean_install
|
||||
|
||||
|
39
docker/Makefile
Normal file
39
docker/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
CLEAN_PACKAGES=\
|
||||
docker \
|
||||
docker-engine \
|
||||
docker.io \
|
||||
containerd \
|
||||
runc
|
||||
|
||||
REQUIRED_PACKAGES=\
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg-agent \
|
||||
software-properties-common
|
||||
|
||||
DOCKER_PACKAGES=\
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
containerd.io
|
||||
|
||||
ROOT_APT=sudo aptitude
|
||||
ROOT_ADD_KEY=sudo apt-key
|
||||
ROOT_ADD_APT=sudo add-apt-repository
|
||||
ROOT_ADD_USER_TO_GROUP=adduser
|
||||
RELEASE:=$(shell lsb_release -cs)
|
||||
|
||||
clean:
|
||||
$(ROOT_APT) remove $(CLEAN_PACKAGES)
|
||||
|
||||
install:
|
||||
$(ROOT_APT) update
|
||||
$(ROOT_APT) install -y $(REQUIRED_PACKAGES)
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | $(ROOT_ADD_KEY) add -
|
||||
$(ROOT_ADD_APT) \
|
||||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
|
||||
$(RELEASE) \
|
||||
stable"
|
||||
$(ROOT_APT) update
|
||||
$(ROOT_APT) install -y $(DOCKER_PACKAGES)
|
||||
$(ROOT_ADD_USER_TO_GROUP) $(shell id -nu) docker
|
Loading…
Reference in New Issue
Block a user