mirror of
https://github.com/hanzoai/docker-github-actions-runner.git
synced 2026-09-30 21:42:55 +00:00
53 lines
2.1 KiB
Docker
53 lines
2.1 KiB
Docker
FROM ubuntu:focal
|
|
LABEL maintainer="[email protected]"
|
|
|
|
ARG GIT_VERSION="2.26.2"
|
|
ARG DUMB_INIT_VERSION="1.2.2"
|
|
ARG DOCKER_KEY="7EA0A9C3F273FCD8"
|
|
|
|
ENV DOCKER_COMPOSE_VERSION="1.26.2"
|
|
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
# hadolint ignore=DL3003,DL4001
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
awscli \
|
|
curl \
|
|
tar \
|
|
unzip \
|
|
apt-transport-https \
|
|
ca-certificates \
|
|
sudo \
|
|
gnupg-agent \
|
|
software-properties-common \
|
|
build-essential \
|
|
zlib1g-dev \
|
|
gettext \
|
|
liblttng-ust0 \
|
|
libcurl4-openssl-dev \
|
|
inetutils-ping \
|
|
jq \
|
|
wget \
|
|
dirmngr \
|
|
openssh-client \
|
|
&& c_rehash \
|
|
&& cd /tmp \
|
|
&& [[ $(lsb_release -cs) == "xenial" ]] && ( wget --quiet "https://github.com/Yelp/dumb-init/releases/download/v${DUMB_INIT_VERSION}/dumb-init_${DUMB_INIT_VERSION}_$(uname -i | sed 's/x86_64/amd64/g').deb" && dpkg -i dumb-init_*.deb && rm dumb-init_*.deb ) || ( apt-get install -y --no-install-recommends dumb-init ) \
|
|
&& curl -sL https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz -o git.tgz \
|
|
&& tar zxf git.tgz \
|
|
&& cd git-${GIT_VERSION} \
|
|
&& ./configure --prefix=/usr \
|
|
&& make \
|
|
&& make install \
|
|
&& cd / \
|
|
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ${DOCKER_KEY} \
|
|
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
|
|
&& [[ $(lsb_release -cs) == "focal" ]] && ( add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu focal stable" ) || ( add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" ) \
|
|
&& apt-get update \
|
|
&& apt-get install -y docker-ce docker-ce-cli containerd.io --no-install-recommends --allow-unauthenticated \
|
|
&& curl -sL "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose \
|
|
&& chmod +x /usr/local/bin/docker-compose \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& rm -rf /tmp/*
|