2018-09-17 09:31:18 +00:00
|
|
|
FROM golang:alpine as builder
|
2017-03-05 17:26:04 +00:00
|
|
|
|
2018-09-17 10:05:34 +00:00
|
|
|
COPY . /go/src/github.com/Luzifer/tex-api
|
2018-09-17 09:31:18 +00:00
|
|
|
WORKDIR /go/src/github.com/Luzifer/tex-api
|
2017-03-05 17:26:04 +00:00
|
|
|
|
2017-03-05 22:19:43 +00:00
|
|
|
RUN set -ex \
|
2019-07-06 16:44:56 +00:00
|
|
|
&& apk add --no-cache \
|
|
|
|
git \
|
2018-09-17 09:31:18 +00:00
|
|
|
&& go install -ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)"
|
2017-03-05 22:19:43 +00:00
|
|
|
|
2019-07-06 16:44:56 +00:00
|
|
|
FROM alpine:3.10
|
2018-09-17 09:31:18 +00:00
|
|
|
|
|
|
|
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
2017-03-05 17:26:04 +00:00
|
|
|
|
2018-09-17 10:05:34 +00:00
|
|
|
ENV SCRIPT=/usr/local/bin/tex-build.sh
|
|
|
|
|
2017-03-05 17:26:04 +00:00
|
|
|
RUN set -ex \
|
2018-09-17 09:31:18 +00:00
|
|
|
&& apk --no-cache add \
|
|
|
|
bash \
|
|
|
|
ca-certificates \
|
2019-07-06 16:44:56 +00:00
|
|
|
texlive-xetex \
|
|
|
|
texmf-dist-most
|
2017-03-05 17:26:04 +00:00
|
|
|
|
2018-09-17 09:31:18 +00:00
|
|
|
COPY --from=builder /go/bin/tex-api /usr/local/bin/
|
2019-07-06 16:44:56 +00:00
|
|
|
COPY tex-build.sh /usr/local/bin/
|
2017-03-05 17:26:04 +00:00
|
|
|
|
2018-09-17 09:31:18 +00:00
|
|
|
EXPOSE 3000
|
2017-03-05 22:19:43 +00:00
|
|
|
VOLUME ["/storage"]
|
2017-03-05 17:26:04 +00:00
|
|
|
|
2018-09-17 09:31:18 +00:00
|
|
|
ENTRYPOINT ["/usr/local/bin/tex-api"]
|
2018-09-17 10:05:34 +00:00
|
|
|
CMD ["--"]
|
2018-09-17 09:31:18 +00:00
|
|
|
|
|
|
|
# vim: set ft=Dockerfile:
|