-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
39 lines (29 loc) · 1.05 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# BUILDER IMAGE
FROM golang:alpine AS binbuilder
RUN apk add --no-cache git openssh ca-certificates curl musl-dev openssh make gcc
# Download git-annex to builder image and extract
RUN mkdir /git-annex
RUN curl -Lo /git-annex/git-annex-standalone-amd64.tar.gz https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz
RUN cd /git-annex && tar -xzf git-annex-standalone-amd64.tar.gz && rm git-annex-standalone-amd64.tar.gz
RUN go version
COPY . /gindoid
WORKDIR /gindoid
RUN make
### ============================= ###
# RUNNER IMAGE
FROM alpine:latest
# Update certificates inside runner container
RUN apk add --no-cache git openssh ca-certificates
# Copy git-annex from builder image
COPY --from=binbuilder /git-annex /git-annex
ENV PATH="${PATH}:/git-annex/git-annex.linux"
COPY ./assets /assets
COPY --from=binbuilder /gindoid/build/gindoid /
VOLUME ["/doidata"]
VOLUME ["/config"]
VOLUME ["/doiprep"]
EXPOSE 10443
# ENTRYPOINT /gindoid start
ADD docker_startup.sh .
RUN chmod +x ./docker_startup.sh
ENTRYPOINT ["./docker_startup.sh"]