From 525352edd75930c958f4553f49606ad241c81c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralf=20D=2E=20M=C3=BCller?= Date: Fri, 17 Feb 2023 09:18:15 +0100 Subject: [PATCH] fix (alpine): switch base image to fix docker build --- alpine-latest/Dockerfile | 64 ++++++++++++++++++++++++++++++++++++++++ alpine/Dockerfile | 18 +++++------ 2 files changed, 73 insertions(+), 9 deletions(-) create mode 100644 alpine-latest/Dockerfile diff --git a/alpine-latest/Dockerfile b/alpine-latest/Dockerfile new file mode 100644 index 0000000..505478e --- /dev/null +++ b/alpine-latest/Dockerfile @@ -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 \ No newline at end of file diff --git a/alpine/Dockerfile b/alpine/Dockerfile index d1f77ad..505478e 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -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 @@ -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 @@ -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}" @@ -61,4 +61,4 @@ WORKDIR /project VOLUME /project -ENTRYPOINT /bin/bash +ENTRYPOINT /bin/bash \ No newline at end of file