-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix (alpine): switch base image to fix docker build
- Loading branch information
Showing
2 changed files
with
73 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters