blob: fbb7e5c05e05d8bd872aabcfda8e826270d6a635 (
plain) (
tree)
|
|
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 \
nano vim
# 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"
RUN sudo mkdir -p -- "$MAKEFILE_DIR" && \
sudo chown -- "$JEKYLL_USER:$JEKYLL_USER" "$MAKEFILE_DIR"
WORKDIR "$MAKEFILE_DIR"
COPY --chown="$JEKYLL_USER:$JEKYLL_USER" ["Makefile", "./"]
RUN make ruby-install && \
make ruby-install/clean && \
make ruby && \
make chruby && \
sudo make chruby/profile.d && \
make chruby/clean && \
make bundler
|