mirror of
https://github.com/Luzifer/mediatimeline.git
synced 2024-11-08 06:40:06 +00:00
Dockerize application
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
e3504cdfa0
commit
5d24567ac9
1 changed files with 30 additions and 0 deletions
30
Dockerfile
Normal file
30
Dockerfile
Normal file
|
@ -0,0 +1,30 @@
|
|||
FROM golang:alpine as builder
|
||||
|
||||
COPY . /src/mediatimeline
|
||||
WORKDIR /src/mediatimeline
|
||||
|
||||
RUN set -ex \
|
||||
&& apk add --update git \
|
||||
&& go get \
|
||||
&& go install -ldflags "-X main.version=$(git describe --tags --always || echo dev)"
|
||||
|
||||
FROM alpine:latest
|
||||
|
||||
ENV DATABASE=/data/tweets.db \
|
||||
FRONTEND=/usr/local/share/mediatimeline/frontend
|
||||
|
||||
LABEL maintainer "Knut Ahlers <knut@ahlers.me>"
|
||||
|
||||
RUN set -ex \
|
||||
&& apk --no-cache add ca-certificates
|
||||
|
||||
COPY --from=builder /go/bin/mediatimeline /usr/local/bin/mediatimeline
|
||||
COPY frontend /usr/local/share/mediatimeline/frontend
|
||||
|
||||
EXPOSE 3000
|
||||
VOLUME ["/data"]
|
||||
|
||||
ENTRYPOINT ["/usr/local/bin/mediatimeline"]
|
||||
CMD ["--"]
|
||||
|
||||
# vim: set ft=Dockerfile:
|
Loading…
Reference in a new issue