aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Dockerfile.base
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile.base')
-rw-r--r--Dockerfile.base34
1 files changed, 34 insertions, 0 deletions
diff --git a/Dockerfile.base b/Dockerfile.base
new file mode 100644
index 0000000..2957289
--- /dev/null
+++ b/Dockerfile.base
@@ -0,0 +1,34 @@
+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