Skip to content

Commit

Permalink
Criar imagem docker baseado no alpine #190
Browse files Browse the repository at this point in the history
Contribuição de @sergiopvilar
  • Loading branch information
edusantana authored Jun 17, 2020
1 parent b8b6d11 commit 9c5db18
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions containers/alphine-ruby-latex-pandoc.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
FROM alpine:3.7

LABEL maintainer="[email protected]"

# Tentamos seguir as melhores práticas:
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

RUN apk update \
&& apk upgrade \
&& apk add --no-cache --update \
alpine-sdk \
build-base \
fontconfig \
pdfgrep \
perl \
poppler-utils \
ruby-dev \
ruby \
unzip \
wget

# Instala tinytex (/root/.TinyTex)
RUN wget -qO- "https://yihui.name/gh/tinytex/tools/install-unx.sh" | sh
ENV PATH="/root/bin:${PATH}"

This comment has been minimized.

Copy link
@cauachagas

cauachagas Jun 17, 2020

Collaborator

É preferível colocar ENV PATH=/root/.TinyTeX/bin/x86_64-linuxmusl:$PATH (linuxmusl é na versão com alpine, talvez ENV PATH=/root/.TinyTeX/bin/*:$PATH também funcione e é mais genérico) , pois alguns scripts não são colocados em ~/bin, como o texliveonfly e provavelmente deve acontecer para outros pacotes (não lembro agora de outro)

This comment has been minimized.

Copy link
@edusantana

edusantana Jun 20, 2020

Author Member

@cauachagas Pode alterar o arquivo direto.


# instala bibliotecas para o abntex2/limarka
RUN tlmgr install \
abntex2 \
babel-portuges \
bookmark \
enumitem \
epstopdf-pkg \
iftex \
lastpage \
lipsum \
listings \
caption \
memoir \
microtype \
pdflscape \
pdfpages \
textcase \
xcolor

# Configurando o idioma português
ENV MUSL_LOCALE_DEPS cmake make musl-dev gcc gettext-dev libintl
ENV MUSL_LOCPATH /usr/share/i18n/locales/musl

RUN apk add --no-cache \
$MUSL_LOCALE_DEPS \
&& wget https://gitlab.com/rilian-la-te/musl-locales/-/archive/master/musl-locales-master.zip \
&& unzip musl-locales-master.zip \
&& cd musl-locales-master \
&& cmake -DLOCALE_PROFILE=OFF -D CMAKE_INSTALL_PREFIX:PATH=/usr . && make && make install \
&& cd .. && rm -r musl-locales-master

ENV LANG pt_BR.UTF8

# Instalação do pandoc
RUN wget -O pandoc.tar.gz https://github.com/jgm/pandoc/releases/download/2.9.2.1/pandoc-2.9.2.1-linux-amd64.tar.gz \
&& tar xvzf pandoc.tar.gz --strip-components 1 -C /usr/local/ && rm pandoc.tar.gz

RUN gem install limarka; exit 0

RUN apk del ruby-dev build-base wget alpine-sdk unzip cmake make musl-dev gcc

VOLUME ["/trabalho"]
WORKDIR /trabalho

CMD ["--help"]
ENTRYPOINT ["/usr/local/bundle/bin/limarka"]

0 comments on commit 9c5db18

Please sign in to comment.