sync Dockerfile, add new lines

This commit is contained in:
hackercat
2021-01-22 17:39:07 +00:00
parent 3b7189f165
commit f099cb9c6a
3 changed files with 41 additions and 18 deletions
+20
View File
@@ -24,9 +24,29 @@
- `ghcr.io/catthehacker/ubuntu:runner-18.04`
- `ghcr.io/catthehacker/ubuntu:runner-20.04`
- `ghcr.io/catthehacker/ubuntu:runner-latest`
- quay.io (RedHat Container Registry)
- `quay.io/catthehacker/ubuntu:runner-16.04`
- `quay.io/catthehacker/ubuntu:runner-18.04`
- `quay.io/catthehacker/ubuntu:runner-20.04`
- `quay.io/catthehacker/ubuntu:runner-latest`
- docker.io (DockerHub)
- `catthehacker/ubuntu:runner-16.04`
- `catthehacker/ubuntu:runner-18.04`
- `catthehacker/ubuntu:runner-20.04`
- `catthehacker/ubuntu:runner-latest`
- `\linux\ubuntu\act\Dockerfile` - proposal for [github.com/nektos/act](https://github.com/nektos/act) as base image before support for above image is implemented
- ghcr.io (GitHub Container Registry)
- `ghcr.io/catthehacker/ubuntu:act-16.04`
- `ghcr.io/catthehacker/ubuntu:act-18.04`
- `ghcr.io/catthehacker/ubuntu:act-20.04`
- `ghcr.io/catthehacker/ubuntu:act-latest`
- quay.io (RedHat Container Registry)
- `quay.io/catthehacker/ubuntu:act-16.04`
- `quay.io/catthehacker/ubuntu:act-18.04`
- `quay.io/catthehacker/ubuntu:act-20.04`
- `quay.io/catthehacker/ubuntu:act-latest`
- docker.io (DockerHub)
- `catthehacker/ubuntu:act-16.04`
- `catthehacker/ubuntu:act-18.04`
- `catthehacker/ubuntu:act-20.04`
- `catthehacker/ubuntu:act-latest`
+5 -5
View File
@@ -39,15 +39,15 @@ RUN set -Eeuxo pipefail && \
printf "Updated apt lists and upgraded packages\n\n" && \
apt -yq install --no-install-recommends ssh lsb-release gawk jq curl git wget sudo gnupg-agent ca-certificates software-properties-common apt-transport-https libyaml-0-2 zstd unzip && \
printf "Installed base utils\n" && \
printf "Cleaning image" && \
printf "Cleaning image\n" && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
printf "Cleaned up image"
printf "Cleaned up image\n"
# > Install Node.JS
RUN set -Eeuxo pipefail && \
printf "Installing Node.JS" && \
printf "Installing Node.JS\n" && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
DISTRO="$(lsb_release -s -c)" && \
echo "deb https://deb.nodesource.com/node_${NODE_VERSION}.x $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list && \
@@ -56,11 +56,11 @@ RUN set -Eeuxo pipefail && \
apt -yq install --no-install-recommends nodejs="${NODE_VERSION}*" && \
printf "Installed Node.JS $(node -v)\n" && \
dpkg-query -f '${binary:Package}\n' -W && \
printf "Cleaning image" && \
printf "Cleaning image\n" && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
printf "Cleaned up image"
printf "Cleaned up image\n"
# > Home repository
LABEL org.opencontainers.image.source="https://github.com/CatTheHacker/docker-images"
+16 -13
View File
@@ -17,17 +17,18 @@ ARG DEBIAN_FRONTEND=noninteractive
SHELL [ "/bin/bash", "-c" ]
# > Install base binutils and dependencies, setup environment required for GitHub Actions
# > setup environment required for GitHub Actions
RUN set -Eeuxo pipefail && \
printf "Build started" && \
ImageOS=${DISTRIB_ID}$(echo ${DISTRIB_RELEASE} | cut -d'.' -f 1) && \
echo "IMAGE_OS=$ImageOS" | tee -a /etc/environment && \
echo "ImageOS=$ImageOS" | tee -a /etc/environment && \
echo "LSB_RELEASE=${DISTRIB_RELEASE}" | tee -a /etc/environment && \
AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache && \
echo "AGENT_TOOLSDIRECTORY=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment && \
echo "RUN_TOOL_CACHE=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment && \
echo "RUNNER_USER=${RUNNER_USER}" | tee -a /etc/environment && \
echo "RUNNER_TEMP=/home/${RUNNER_USER}/work/_temp" | tee -a /etc/environment && \
echo "RUN_TOOL_CACHE=$AGENT_TOOLSDIRECTORY" | tee -a /etc/environment && \
echo "DEPLOYMENT_BASEPATH=/opt/runner" | tee -a /etc/environment && \
echo ". /etc/environment" | tee -a /etc/profile && \
mkdir -p $AGENT_TOOLSDIRECTORY && \
@@ -35,21 +36,23 @@ RUN set -Eeuxo pipefail && \
chmod 0777 $AGENT_TOOLSDIRECTORY && \
mkdir -p /github && \
chown 1000:1000 /github && \
chmod 0777 /github && \
printf "Build started" && \
chmod 0777 /github
# > Install deps
RUN set -Eeuxo pipefail && \
apt -yq update && \
printf "Updated apt lists and upgraded packages\n\n" && \
apt -yq install --no-install-recommends lsb-release gawk jq curl git wget sudo gnupg-agent ca-certificates software-properties-common apt-transport-https zstd unzip && \
apt -yq install --no-install-recommends ssh lsb-release gawk jq curl git wget sudo gnupg-agent ca-certificates software-properties-common apt-transport-https libyaml-0-2 zstd unzip && \
printf "Installed base utils\n" && \
printf "Cleaning image" && \
printf "Cleaning image\n" && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
printf "Cleaned up image"
printf "Cleaned up image\n"
# > Install Node.JS
RUN set -Eeuxo pipefail && \
printf "Installing Node.JS" && \
printf "Installing Node.JS\n" && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
DISTRO="$(lsb_release -s -c)" && \
echo "deb https://deb.nodesource.com/node_${NODE_VERSION}.x $DISTRO main" | tee /etc/apt/sources.list.d/nodesource.list && \
@@ -58,23 +61,23 @@ RUN set -Eeuxo pipefail && \
apt -yq install --no-install-recommends nodejs="${NODE_VERSION}*" && \
printf "Installed Node.JS $(node -v)\n" && \
dpkg-query -f '${binary:Package}\n' -W && \
printf "Cleaning image" && \
printf "Cleaning image\n" && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/* && \
printf "Cleaned up image"
printf "Cleaned up image\n"
# > Create non-root user
RUN set -Eeuxo pipefail && \
printf "Creating non-root user" && \
printf "Creating non-root user\n" && \
groupadd -g 1000 ${RUNNER_USER} && \
useradd -u 1000 -g ${RUNNER_USER} -G sudo -m -s /bin/bash ${RUNNER_USER} && \
sed -i /etc/sudoers -re 's/^%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
sed -i /etc/sudoers -re 's/^root.*/root ALL=(ALL:ALL) NOPASSWD: ALL/g' && \
sed -i /etc/sudoers -re 's/^#includedir.*/## **Removed the include directive** ##"/g' && \
echo "${RUNNER_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
echo "runner user: $(su - ${RUNNER_USER} -c id)" && \
printf "Created non-root user $(grep ${RUNNER_USER} /etc/passwd)"
printf "runner user: $(su - ${RUNNER_USER} -c id)\n" && \
printf "Created non-root user $(grep ${RUNNER_USER} /etc/passwd)\n"
# > Home repository
LABEL org.opencontainers.image.source="https://github.com/CatTheHacker/docker-images"