mirror of
https://github.com/repo-runner/debian-docker.git
synced 2024-11-09 14:20:01 +00:00
Renew build, update docker and inner-runner
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
3de69d630a
commit
b191c49fe2
2 changed files with 43 additions and 8 deletions
12
Dockerfile
12
Dockerfile
|
@ -1,13 +1,9 @@
|
|||
FROM debian
|
||||
FROM debian:stretch
|
||||
|
||||
ENV REPO_RUNNER_VERSION=v0.11.0 \
|
||||
DOCKER_VERSION=17.09.0-ce
|
||||
|
||||
ADD https://github.com/Luzifer/repo-runner/releases/download/${REPO_RUNNER_VERSION}/inner-runner_linux_amd64 /usr/local/bin/inner-runner
|
||||
LABEL maintainer Knut Ahlers <knut@ahlers.me>
|
||||
|
||||
COPY build.sh /usr/local/bin/
|
||||
RUN set -ex \
|
||||
&& apt-get update && apt-get install -y make curl git \
|
||||
&& curl -sSL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | tar -xz -C /usr/local/bin --strip-components=1 \
|
||||
&& chmod +x /usr/local/bin/inner-runner
|
||||
&& /usr/local/bin/build.sh
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/inner-runner"]
|
||||
|
|
39
build.sh
Executable file
39
build.sh
Executable file
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install required utils
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
ca-certificates \
|
||||
curl \
|
||||
dirmngr \
|
||||
git \
|
||||
gnupg \
|
||||
jq \
|
||||
lsb-release \
|
||||
make
|
||||
|
||||
# Download latest release of inner-runner
|
||||
DOWNLOAD=$(curl -sSfL https://api.github.com/repos/repo-runner/repo-runner/releases/latest |
|
||||
jq -r '.assets | .[] | select(.name == "inner-runner_linux_amd64.tar.gz") | .browser_download_url')
|
||||
curl -sSfL "${DOWNLOAD}" | tar -xzf - -C /usr/local/bin
|
||||
mv /usr/local/bin/inner-runner* /usr/local/bin/inner-runner
|
||||
|
||||
# Install docker-ce
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||||
|
||||
echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -sc) stable" >/etc/apt/sources.list.d/docker.list
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends docker-ce
|
||||
|
||||
# Cleanup
|
||||
apt-get purge -y \
|
||||
dirmngr \
|
||||
gnupg \
|
||||
jq \
|
||||
lsb-release
|
||||
apt-get autoremove --purge -y
|
||||
rm -rf /var/lib/apt/lists/*
|
Loading…
Reference in a new issue