forked from meAmidos/dcind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ubuntu
27 lines (24 loc) · 1.8 KB
/
Dockerfile.ubuntu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Inspired by https://github.com/mumoshu/dcind
# see : https://github.com/actions/runner-images/issues/7606
FROM summerwind/actions-runner:ubuntu-22.04
LABEL maintainer="Henry Chan <[email protected]>"
USER root
ENV DOCKER_VERSION=19.03.12 \
DOCKER_COMPOSE_VERSION=1.25.0
RUN apt-get update
# Install Docker and Docker Compose
# from https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-install-Docker-and-docker-compose-on-Ubuntu#:~:text=Docker%20and%20compose%20install%20steps%20on%20Ubuntu&text=Download%20Docker%20GPG%20file,Docker%20and%20docker%20compose%20setup
RUN apt-get -y install curl gnupg ca-certificates lsb-release git-all
RUN mkdir -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee -a /etc/apt/sources.list.d/docker.list > /dev/null
# https://github.com/cli/cli/blob/trunk/docs/install_linux.md
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
RUN chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee -a /etc/apt/sources.list.d/github-cli.list > /dev/null
# must run it "update" again per: https://stackoverflow.com/questions/71393595/installing-docker-in-ubuntu-from-repo-cant-find-a-repo
RUN apt-get update
RUN apt-get -y install gh
RUN apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
#USER runner
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/bin/bash"]