vikunja-api/Dockerfile

46 lines
941 B
Text
Raw Normal View History

2018-09-08 15:08:33 +02:00
###################################
#Build stage
2018-11-25 22:00:43 +01:00
FROM golang:1.11-alpine AS build-env
2018-09-08 15:08:33 +02:00
ARG VIKUNJA_VERSION
ENV TAGS "sqlite"
ENV GO111MODULE=on
ENV GOFLAGS=-mod=vendor
2018-09-08 15:08:33 +02:00
#Build deps
2018-09-08 15:18:57 +02:00
RUN apk --no-cache add build-base git
2018-09-08 15:08:33 +02:00
#Setup repo
2018-09-08 16:10:06 +02:00
COPY . ${GOPATH}/src/code.vikunja.io/api
WORKDIR ${GOPATH}/src/code.vikunja.io/api
2018-09-08 15:08:33 +02:00
#Checkout version if set
RUN if [ -n "${VIKUNJA_VERSION}" ]; then git checkout "${VIKUNJA_VERSION}"; fi \
2018-09-08 15:18:57 +02:00
&& make clean build
2018-09-08 15:08:33 +02:00
FROM alpine:3.7
LABEL maintainer="maintainers@vikunja.io"
EXPOSE 3456
RUN apk --no-cache add \
bash \
ca-certificates \
curl \
gettext \
linux-pam \
s6 \
sqlite \
su-exec \
tzdata
COPY docker /
2018-11-02 10:18:38 +01:00
COPY --from=build-env /go/src/code.vikunja.io/api/templates /app/vikunja/templates
2018-09-08 16:54:21 +02:00
COPY --from=build-env /go/src/code.vikunja.io/api/vikunja /app/vikunja/vikunja
2018-09-08 16:10:06 +02:00
ENV VIKUNJA_SERVICE_ROOTPATH=/app/vikunja/
2018-09-08 16:10:06 +02:00
ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
CMD []