blob: 54afae37c49e952fba7b7e18c071a62772e00960 [file] [log] [blame]
Akronf09fc562023-01-11 08:47:21 +01001# Build stage
2FROM golang:latest as build
3WORKDIR /src
4
5COPY go.mod go.sum ./
6RUN go mod download
7
8COPY . /src
9
10RUN apt-get update && \
11 apt-get upgrade -y ca-certificates
12
13RUN go test .
14
15RUN go build -o /src/kalamar-plugin-externalresources .
16
17# Main stage
18FROM busybox:glibc
19
20EXPOSE 5722
21
22WORKDIR /
23
24COPY --from=build /etc/ssl/certs /etc/ssl/certs
25COPY --from=build /src/kalamar-plugin-externalresources /kalamar-plugin-externalresources
26COPY --from=build /src/templates /templates
27
28ENTRYPOINT [ "./kalamar-plugin-externalresources" ]
29
30LABEL maintainer="korap@ids-mannheim.de"
31LABEL description="Docker Image for Kalamar-Plugin-ExternalResources, a frontend plugin to link texts to external resources"
32LABEL repository="https://github.com/KorAP/..."
33
34# docker build -f Dockerfile -t korap/kalamar-plugin-externalresources .
35# docker run --rm --network host -v ${PWD}/db/:/db/:z -v ${PWD}/.env:/.env korap/kalamar-plugin-externalresources