-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
14fca13
commit f5e4b72
Showing
6 changed files
with
155 additions
and
21 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
File renamed without changes.
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,91 @@ | ||
# vim: set syntax=dockerfile: | ||
|
||
FROM ubuntu:bionic | ||
|
||
ARG PANDOC_VERSION | ||
ARG PANDOC_CROSSREF_VERSION | ||
ARG PANDOC_INCLUDE_CODE_VERSION | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get upgrade --quiet --yes \ | ||
&& apt-get update --quiet \ | ||
&& apt-get install --quiet --yes \ | ||
bash-completion \ | ||
curl \ | ||
fonts-inconsolata \ | ||
fonts-linuxlibertine \ | ||
fonts-croscore \ | ||
fonts-crosextra-carlito \ | ||
fonts-texgyre \ | ||
git \ | ||
inotify-tools \ | ||
lmodern \ | ||
locales \ | ||
librsvg2-bin \ | ||
make \ | ||
tex-gyre \ | ||
texlive-fonts-extra \ | ||
texlive-fonts-recommended \ | ||
texlive-lang-french \ | ||
texlive-latex-extra \ | ||
texlive-latex-recommended \ | ||
texlive-science \ | ||
texlive-xetex \ | ||
tzdata \ | ||
wget \ | ||
&& apt-get autoremove --quiet --yes \ | ||
&& apt-get clean \ | ||
&& wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb \ | ||
--output-document pandoc.deb \ | ||
--quiet \ | ||
&& dpkg -i pandoc.deb \ | ||
&& rm pandoc.deb \ | ||
&& wget https://github.com/lierdakil/pandoc-crossref/releases/download/v${PANDOC_CROSSREF_VERSION}/linux-pandoc_2_7.tar.gz \ | ||
--output-document pandoc-crossref.tar.gz \ | ||
--quiet \ | ||
&& tar xf pandoc-crossref.tar.gz \ | ||
&& mv pandoc-crossref /usr/local/bin \ | ||
&& wget https://github.com/owickstrom/pandoc-include-code/releases/download/v${PANDOC_INCLUDE_CODE_VERSION}/pandoc-include-code-linux-ghc8-pandoc-1-19.tar.gz \ | ||
--output-document pandoc-include-code.tar.gz \ | ||
--quiet \ | ||
&& tar xf pandoc-include-code.tar.gz \ | ||
&& mv pandoc-include-code /usr/local/bin | ||
|
||
# Set the locale | ||
RUN locale-gen en_US | ||
RUN locale-gen en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LANGUAGE en_US:en | ||
ENV LC_ALL en_US.UTF-8 | ||
|
||
# Set timezone | ||
RUN rm /etc/localtime | ||
RUN ln -s /usr/share/zoneinfo/Europe/Zurich /etc/localtime | ||
|
||
# Create less privileged user | ||
RUN groupadd --gid 1000 dev \ | ||
&& useradd --uid 1000 --gid dev --shell /bin/bash --create-home dev | ||
|
||
# Mount your app source code directory into that folder | ||
WORKDIR /home/dev/doc | ||
|
||
# Add bash completion | ||
RUN echo 'source /etc/profile.d/bash_completion.sh' >> ~/.bashrc | ||
RUN echo 'source /etc/profile.d/bash_completion.sh' >> /home/dev/.bashrc | ||
|
||
# Fix permissions issues | ||
RUN chmod -R a+wrx /home/dev | ||
RUN chmod -R a+rx /usr/local/bin/pandoc-crossref | ||
RUN chmod -R a+rx /usr/local/bin/pandoc-include-code | ||
|
||
# Label schema related variables and metadata | ||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
|
||
LABEL maintainer="Julien M'Poy <[email protected]>" \ | ||
org.label-schema.build-date=${BUILD_DATE} \ | ||
org.label-schema.vcs-ref=${VCS_REF} \ | ||
org.label-schema.vcs-url="https://github.com/groovytron/pandoc-container" \ | ||
org.label-schema.schema-version="1.0" |
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 |
---|---|---|
@@ -1,20 +1,28 @@ | ||
BUILD_NAME=pandoc-container | ||
COMMON_BUILD_TAGS=--build-arg VCS_REF="$(shell git rev-parse HEAD)" --build-arg BUILD_DATE="$(shell date -u +"%Y-%m-%dT%H:%m:%SZ")" | ||
BUILD_NAME=pandoc | ||
COMPOSE_BUILD_NAME=pandoc-container | ||
VERSIONS=2.7.3 2.7.2 | ||
ALL=$(addprefix pandoc,$(VERSIONS)) | ||
VCS_REF="$(shell git rev-parse HEAD)" | ||
BUILD_DATE="$(shell date -u +"%Y-%m-%dT%H:%m:%SZ")" | ||
|
||
.PHONY:build | ||
build: | ||
docker build \ | ||
$(COMMON_BUILD_TAGS) \ | ||
--build-arg PANDOC_VERSION=2.7.2 \ | ||
--build-arg PANDOC_CROSSREF_VERSION=0.3.4.0d \ | ||
--build-arg PANDOC_INCLUDE_CODE_VERSION=1.2.0.2 \ | ||
--tag $(BUILD_NAME):latest \ | ||
. | ||
.PHONY: all | ||
all: $(ALL) | ||
|
||
.PHONY:test | ||
test: | ||
./test.sh | ||
.PHONY: $(ALL) | ||
$(ALL): | ||
BUILD_DATE=$(BUILD_DATE) \ | ||
BUILD_NAME=$(BUILD_NAME) \ | ||
COMPOSE_BUILD_NAME=$(COMPOSE_BUILD_NAME) \ | ||
VCS_REF=$(VCS_REF) \ | ||
docker-compose -f build.yaml build \ | ||
$@ | ||
|
||
# .PHONY:test | ||
# test: | ||
# ./test.sh | ||
|
||
.PHONY:clean | ||
clean: | ||
docker images | grep $(BUILD_NAME) | tr -s ' ' | cut -d ' ' -f2 | xargs -I {} echo $(BUILD_NAME):{} | ||
for VERSION in $(VERSIONS); do \ | ||
docker image rm -f $(COMPOSE_BUILD_NAME):$$VERSION; \ | ||
done |
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,24 @@ | ||
# This file is only used to build multiple images | ||
version: '3' | ||
|
||
services: | ||
pandoc2.7.3: | ||
image: ${COMPOSE_BUILD_NAME}:2.7.3 | ||
build: | ||
dockerfile: 2.7.3/Dockerfile | ||
context: . | ||
args: | ||
- PANDOC_VERSION=2.7.3 | ||
- PANDOC_CROSSREF_VERSION=0.3.4.0d | ||
- PANDOC_INCLUDE_CODE_VERSION=1.2.0.2 | ||
- VCS_REF=$VCS_REF | ||
pandoc2.7.2: | ||
image: ${COMPOSE_BUILD_NAME}:2.7.2 | ||
build: | ||
dockerfile: 2.7.2/Dockerfile | ||
context: . | ||
args: | ||
- PANDOC_VERSION=2.7.2 | ||
- PANDOC_CROSSREF_VERSION=0.3.4.1 | ||
- PANDOC_INCLUDE_CODE_VERSION=1.2.0.2 | ||
- VCS_REF=$VCS_REF |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/bin/bash | ||
|
||
docker run -it \ | ||
--user dev \ | ||
pandoc-container:latest \ | ||
bash -c "git clone https://github.com/HE-Arc/rapport-technique.git && cd rapport-technique && make" | ||
git clone https://github.com/HE-Arc/rapport-technique.git || return 1 | ||
cd rapport-technique || return 1 | ||
make || return 1 |