Skip to content

Commit

Permalink
Merge pull request #15 from fluz/update_dockerbuild
Browse files Browse the repository at this point in the history
Update dockerbuild
  • Loading branch information
fluz committed Oct 21, 2023
2 parents b70bceb + 7cb541d commit c6d9ddd
Show file tree
Hide file tree
Showing 1,939 changed files with 58 additions and 75 deletions.
67 changes: 21 additions & 46 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,55 +1,30 @@
# [START - building phase]
FROM debian:bullseye
FROM alpine:3.18.4
LABEL maintainer="Fernando Luz <prof.fernando.luz@gmail.com>"

RUN set -e -x; \
apt-get update; \
apt-get install -y --no-install-recommends \
openjdk-17-jre \
pandoc \
texlive texlive-latex-extra texlive-plain-generic texlive-latex-recommended cm-super \
python3-yaml python3-jinja2 \
locales inkscape

# setup su and locale
RUN set -e -x; \
sed -i '/pam_rootok.so$/aauth sufficient pam_permit.so' /etc/pam.d/su; \
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen; locale-gen
ENV LC_ALL=en_US.UTF-8
RUN apk update; \
apk upgrade; \
apk add --no-cache \
pandoc-cli=0.1.1-r2 \
bash=5.2.15-r5 \
openjdk17-jre=17.0.8_p7-r0 \
texlive=20230506.66984-r0 \
texmf-dist-latexextra=2023.66587-r1 \
# Necessary to execute modern CV Classic
# texmf-dist-fontsextra=2023.66587-r1 \
py3-yaml=6.0-r3 \
py3-jinja2=3.1.2-r2 \
inkscape=1.2.2-r7;

ENV APP_HOME=/app
RUN ["mkdir", "${APP_HOME}"]

WORKDIR ${APP_HOME}

COPY . ${APP_HOME}

# RUN ./gradlew tasks cvAll
# [END - building phase]



# # install debian packages:
# ENV DEBIAN_FRONTEND=noninteractive


# # copy host to docker
# RUN ["mkdir", "${APP_HOME}"]
# WORKDIR ${APP_HOME}

# # COPY build.ninja ${APP_HOME}
# COPY gradlew ${APP_HOME}
# COPY gradle ${APP_HOME}/gradle
# COPY build.gradle.kts ${APP_HOME}
# COPY settings.gradle.kts ${APP_HOME}
# # COPY README.md ${APP_HOME}
# COPY fluz.yml ${APP_HOME}
# # COPY build_cv.sh ${APP_HOME}
# COPY assets ${APP_HOME}/assets
# COPY moderncvclassic ${APP_HOME}/moderncvclassic
# COPY ceevee ${APP_HOME}/ceevee
# COPY markdown ${APP_HOME}/markdown
# COPY tools ${APP_HOME}/tools
# COPY DevResume ${APP_HOME}/DevResume
# COPY pandoc-bootstrap ${APP_HOME}/pandoc-bootstrap
# COPY europasscv ${APP_HOME}/europasscv
COPY gradle ${APP_HOME}/gradle
COPY gradlew ${APP_HOME}
COPY build.gradle.kts ${APP_HOME}
COPY settings.gradle.kts ${APP_HOME}
COPY README.md ${APP_HOME}
COPY tools ${APP_HOME}/tools
COPY src ${APP_HOME}/src
38 changes: 21 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

import java.nio.file.Files

val INPUT_CV_FILE = "src/fluz.yml"

tasks.register<Exec>("genMarkdown") {
logger.info("Generating Markdown CV version")
group = "CV generation"
Expand All @@ -18,9 +20,9 @@ tasks.register<Exec>("genMarkdown") {
doFirst {
Files.createDirectories(directory.toPath())
}
commandLine("./tools/jinja2-render", "-y", "fluz.yml",
commandLine("./tools/jinja2-render", "-y", INPUT_CV_FILE,
"-o", "build/markdown/cv.md",
"markdown/cv.md.jinja"
"src/views/markdown/cv.md.jinja"
)
}

Expand All @@ -32,7 +34,7 @@ tasks.register<Exec>("genMarkdownHtml") {

commandLine("pandoc", "-f", "markdown", "-t", "html",
"--metadata", "title='Fernando Luz'", "-s",
"--template", "pandoc-bootstrap/template.html", "--css", "pandoc-bootstrap/template.css",
"--template", "src/views/pandoc-bootstrap/template.html", "--css", "src/views/pandoc-bootstrap/template.css",
"-o", "build/markdown/cv.html",
"build/markdown/cv.md")

Expand Down Expand Up @@ -62,9 +64,9 @@ tasks.register<Exec>("_europassTex") {
doFirst {
Files.createDirectories(directory.toPath())
}
commandLine("./tools/jinja2-render", "-y", "fluz.yml",
commandLine("./tools/jinja2-render", "-y", INPUT_CV_FILE,
"-o", "build/europasscv/cv.tex",
"europasscv/cv.tex.jinja")
"src/views/europasscv/cv.tex.jinja")

}

Expand All @@ -73,8 +75,8 @@ tasks.register<Copy>("_copyEuropassCls") {
group = "CV helper"
description = "copy necessary files to compile Europass CV Pdf"

from(file("europasscv/europasscv.cls"))
into("build/europasscv/europasscv.cls")
from(file("src/views/europasscv/europasscv.cls"))
into("build/europasscv")
}

tasks.register<Exec>("genEuropassPdf") {
Expand All @@ -91,8 +93,8 @@ tasks.register<Copy>("_copyDevResumeAssets") {
group = "CV helper"
description = "copy necessary files execute DevResume view"

from(file("Assets"))
into("build/Assets")
from(file("src/views/assets"))
into("build/assets")
}

tasks.register<Exec>("genDevResume") {
Expand All @@ -107,9 +109,9 @@ tasks.register<Exec>("genDevResume") {
doFirst {
Files.createDirectories(directory.toPath())
}
commandLine("./tools/jinja2-render", "-y", "fluz.yml",
commandLine("./tools/jinja2-render", "-y", INPUT_CV_FILE,
"-o", "build/DevResume/index.html",
"DevResume/cv.html.jinja")
"src/views/DevResume/cv.html.jinja")
}

tasks.register<Exec>("genCeeVee") {
Expand All @@ -123,12 +125,13 @@ tasks.register<Exec>("genCeeVee") {
doFirst {
Files.createDirectories(directory.toPath())
}
commandLine("./tools/jinja2-render", "-y", "fluz.yml",
commandLine("./tools/jinja2-render", "-y", INPUT_CV_FILE,
"-o", "build/ceevee/index.html",
"ceevee/cv.html.jinja")
"src/views/ceevee/cv.html.jinja")
}

tasks.register<Exec>("_modernCVClassicTex") {
// Need to validate the fonts issue in dockerfile (consider to remove fontawesome5.sty dependency)
tasks.register<Exec>("x_modernCVClassicTex") {
logger.info("Generating Modern CV Classic")
group = "CV helper"
description = "Generates Modern CV Classic LaTex version."
Expand All @@ -139,13 +142,14 @@ tasks.register<Exec>("_modernCVClassicTex") {
doFirst {
Files.createDirectories(directory.toPath())
}
commandLine("./tools/jinja2-render", "-y", "fluz.yml",
commandLine("./tools/jinja2-render", "-y", INPUT_CV_FILE,
"-o", "build/moderncvclassic/cv.tex",
"moderncvclassic/cv.tex.jinja")
"src/views/moderncvclassic/cv.tex.jinja")

}

tasks.register<Exec>("genModernCVClassicPdf") {
// Need to validate the fonts issue in dockerfile (consider to remove fontawesome5.sty dependency)
tasks.register<Exec>("xgenModernCVClassicPdf") {
logger.info("Generation Modern CV Classic [pdf]")
group = "CV generation"
description = "Generates Modern CV Classic Pdf version."
Expand Down
12 changes: 0 additions & 12 deletions build_cv.sh

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit c6d9ddd

Please sign in to comment.