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 \
|
2019-07-06 16:45:48 +00:00
|
|
|
&& go install \
|
|
|
|
-ldflags "-X main.version=$(git describe --tags || git rev-parse --short HEAD || echo dev)" \
|
2021-07-26 11:46:50 +00:00
|
|
|
-mod=readonly
|
2017-03-05 22:19:43 +00:00
|
|
|
|
2024-06-15 10:35:43 +00:00
|
|
|
|
|
|
|
FROM luzifer/archlinux:latest
|
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 \
|
2024-06-15 10:35:43 +00:00
|
|
|
&& pacman --noconfirm -Sy \
|
2018-09-17 09:31:18 +00:00
|
|
|
ca-certificates \
|
2024-06-15 10:35:43 +00:00
|
|
|
texlive
|
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:
|