Skip to content

Commit

Permalink
fix (alpine): switch base image to fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmueller committed Feb 17, 2023
1 parent e28a0f0 commit 525352e
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 9 deletions.
64 changes: 64 additions & 0 deletions alpine-latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
FROM eclipse-temurin:11-jdk-alpine

# see https://github.com/docker-library/openjdk/issues/73
ENV LC_CTYPE en_US.UTF-8

RUN addgroup -S dtcgroup && adduser -S dtcuser -G dtcgroup

RUN apk update && apk upgrade && apk add --no-cache build-base

RUN echo "add needed tools" && \
apk add --no-cache curl wget zip unzip git bash --virtual build-dependencies build-base\
git \
graphviz \
python3 \
ruby-dev \
py-pygments \
yaml-dev \
ttf-dejavu
RUN gem update --system
RUN gem install rdoc --no-document
RUN gem install pygments.rb

# Add pandoc
# https://github.com/advancedtelematic/dockerfiles/blob/master/doctools/Dockerfile
#RUN apk add --no-cache cmark --repository http://nl.alpinelinux.org/alpine/edge/testing && \
# apk add --no-cache --allow-untrusted pandoc --repository https://conoria.gitlab.io/alpine-pandoc/

SHELL ["/bin/bash", "-c"]

USER dtcuser
WORKDIR /home/dtcuser
ENV HOME=/home/dtcuser

ENV GRADLE_USER_HOME=/home/dtcuser/.gradle

ARG DTC_VERSION
RUN git clone --branch ng https://github.com/docToolchain/docToolchain.git && \
cd docToolchain && \
git fetch --tags && \
git checkout ${DTC_VERSION} && \
git submodule update -i && \
# remove .git folders
rm -rf `find -type d -name .git` && \
umask g+w && \
./gradlew downloadDependencies && \
chmod -R o=u $GRADLE_USER_HOME && \
chmod -R g=u $GRADLE_USER_HOME && \
rm -r $GRADLE_USER_HOME/daemon && \
chmod -R o=u $HOME

# add reveal.js
RUN cd /home/dtcuser/docToolchain/resources/. && \
./clone.sh && \
cd -

ENV PATH="/home/dtcuser/docToolchain/bin:${PATH}"

USER dtcuser

WORKDIR /project

VOLUME /project

ENTRYPOINT /bin/bash
18 changes: 9 additions & 9 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:14-jdk-alpine
FROM eclipse-temurin:11-jdk-alpine

# see https://github.com/docker-library/openjdk/issues/73
ENV LC_CTYPE en_US.UTF-8
Expand All @@ -11,13 +11,13 @@ RUN echo "add needed tools" && \
apk add --no-cache curl wget zip unzip git bash --virtual build-dependencies build-base\
git \
graphviz \
python \
python3 \
ruby-dev \
py-pygments \
libc6-compat \
ttf-dejavu
RUN gem update --system --no-rdoc --no-ri
RUN gem install rdoc --no-document
yaml-dev \
ttf-dejavu
RUN gem update --system
RUN gem install rdoc --no-document
RUN gem install pygments.rb

# Add pandoc
Expand Down Expand Up @@ -49,9 +49,9 @@ RUN git clone --branch ng https://github.com/docToolchain/docToolchain.git
chmod -R o=u $HOME

# add reveal.js
RUN cd /home/dtcuser/docToolchain/resources/. && \
RUN cd /home/dtcuser/docToolchain/resources/. && \
./clone.sh && \
cd -
cd -

ENV PATH="/home/dtcuser/docToolchain/bin:${PATH}"

Expand All @@ -61,4 +61,4 @@ WORKDIR /project

VOLUME /project

ENTRYPOINT /bin/bash
ENTRYPOINT /bin/bash

0 comments on commit 525352e

Please sign in to comment.