1
0
Fork 0
mirror of https://github.com/Luzifer/tex-api.git synced 2024-11-08 16:20:04 +00:00
tex-api/Dockerfile

38 lines
766 B
Text
Raw Normal View History

FROM golang:alpine as builder
ENV GO111MODULE=on
COPY . /go/src/github.com/Luzifer/tex-api
WORKDIR /go/src/github.com/Luzifer/tex-api
RUN set -ex \
&& apk add --no-cache \
git \
&& go install \
-ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
-mod=vendor
FROM alpine:3.10
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
ENV SCRIPT=/usr/local/bin/tex-build.sh
RUN set -ex \
&& apk --no-cache add \
bash \
ca-certificates \
texlive-xetex \
texmf-dist-most
COPY --from=builder /go/bin/tex-api /usr/local/bin/
COPY tex-build.sh /usr/local/bin/
EXPOSE 3000
VOLUME ["/storage"]
ENTRYPOINT ["/usr/local/bin/tex-api"]
CMD ["--"]
# vim: set ft=Dockerfile: