-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Update to Ubuntu 22.04, install compose plugin
Also: move install steps to shell script to reduce image size and number of layers.
- Loading branch information
Showing
2 changed files
with
33 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,12 @@ | ||
FROM ubuntu:18.04 | ||
FROM ubuntu:22.04 | ||
|
||
RUN apt-get update \ | ||
&& apt-get dist-upgrade -y | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV LANG C.UTF-8 | ||
|
||
RUN apt-get install -y apt-transport-https ca-certificates curl software-properties-common | ||
COPY install_docker.sh /opt/install_docker.sh | ||
|
||
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | ||
RUN bash /opt/install_docker.sh | ||
|
||
RUN add-apt-repository \ | ||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | ||
$(lsb_release -cs) \ | ||
stable" | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y docker-ce | ||
|
||
|
||
RUN COMPOSE_VERSION=`curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'` \ | ||
&& sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose" \ | ||
RUN COMPOSE_VERSION="$(curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')" \ | ||
&& sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose" \ | ||
&& chmod +x /usr/local/bin/docker-compose | ||
|
||
RUN apt-get purge -y apt-transport-https software-properties-common \ | ||
&& apt-get --purge -y autoremove \ | ||
&& apt-get autoclean \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
apt-get update | ||
|
||
apt-get dist-upgrade -y | ||
|
||
apt-get install -y apt-transport-https ca-certificates curl software-properties-common | ||
|
||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | ||
|
||
add-apt-repository \ | ||
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | ||
$(lsb_release -cs) \ | ||
stable" | ||
|
||
apt-get update | ||
|
||
apt-get install -y docker-ce docker-compose-plugin | ||
|
||
apt-get purge -y apt-transport-https software-properties-common | ||
apt-get --purge -y autoremove | ||
apt-get autoclean | ||
apt-get clean | ||
rm -rf /var/lib/apt/lists/* |