FROM debian:buster-slim SHELL ["/bin/bash", "-c"] ENV DEBIAN_FRONTEND=noninteractive RUN apt update -yq && \ apt install -yq --no-install-recommends \ build-essential \ ca-certificates wget \ sudo # Creating regular user 'developer': ARG JEKYLL_USER=developer ENV JEKYLL_USER="$JEKYLL_USER" RUN addgroup "$JEKYLL_USER" && \ adduser --disabled-password --gecos "" --ingroup "$JEKYLL_USER" --home "/home/$JEKYLL_USER" "$JEKYLL_USER" && \ addgroup "$JEKYLL_USER" sudo && \ echo -e '%sudo ALL=(ALL) NOPASSWD:ALL\nDefaults env_keep += "HOME"' >> /etc/sudoers USER "$JEKYLL_USER" ENV PATH="/home/$JEKYLL_USER/.local/bin:$PATH" ENV MAKEFILE_DIR="/utils" COPY ["Makefile", "$MAKEFILE_DIR/"] WORKDIR "$MAKEFILE_DIR" RUN sudo make ruby-install && \ sudo make ruby-install/clean && \ make ruby && \ sudo make chruby && \ sudo make chruby/profile.d && \ sudo make chruby/clean && \ make bundler