mirror of
https://github.com/repo-runner/archlinux.git
synced 2024-11-09 09:50:03 +00:00
Initial version
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
commit
695fe3a1bf
2 changed files with 45 additions and 0 deletions
12
Dockerfile
Normal file
12
Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
FROM luzifer/archlinux
|
||||||
|
|
||||||
|
LABEL maintainer Knut Ahlers <knut@ahlers.me>
|
||||||
|
|
||||||
|
COPY build.sh /usr/local/bin/
|
||||||
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& /usr/local/bin/build.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/inner-runner"]
|
||||||
|
CMD ["--"]
|
||||||
|
|
33
build.sh
Executable file
33
build.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -euxo pipefail
|
||||||
|
|
||||||
|
# Packages required to build the image
|
||||||
|
pkg_build=(
|
||||||
|
jq
|
||||||
|
)
|
||||||
|
|
||||||
|
# Packages kept for the final image
|
||||||
|
pkg_img=(
|
||||||
|
ca-certificates
|
||||||
|
curl
|
||||||
|
docker
|
||||||
|
git
|
||||||
|
make
|
||||||
|
)
|
||||||
|
|
||||||
|
# Install required packages
|
||||||
|
pacman -Syyu --noconfirm
|
||||||
|
pacman -S --noconfirm "${pkg_build[@]}" "${pkg_img[@]}"
|
||||||
|
|
||||||
|
function get_asset_url() {
|
||||||
|
curl -sSfL "https://api.github.com/repos/${1}/releases/latest" |
|
||||||
|
jq -r '.assets | .[] | .browser_download_url' |
|
||||||
|
grep -E 'linux.*amd64.tar.gz'
|
||||||
|
}
|
||||||
|
|
||||||
|
# Download latest release of inner-runner
|
||||||
|
curl -sSfL "$(get_asset_url repo-runner/repo-runner | grep inner-runner)" | tar -xzf - -C /usr/local/bin
|
||||||
|
mv /usr/local/bin/inner-runner* /usr/local/bin/inner-runner
|
||||||
|
|
||||||
|
# Purge build-packages
|
||||||
|
pacman -Rs --noconfirm "${pkg_build[@]}"
|
Loading…
Reference in a new issue