1
0
Fork 0
mirror of https://github.com/Luzifer/tex-api.git synced 2024-11-09 08:40:02 +00:00
tex-api/Dockerfile
Knut Ahlers 00582cddc1
Migrate to Alpine as the base image
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2018-09-17 11:31:18 +02:00

29 lines
713 B
Docker

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