Add Dockerfile
Change-Id: I299a96042462b39abeaf2d0c9ea9c693528eb6e9
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..54afae3
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,35 @@
+# Build stage
+FROM golang:latest as build
+WORKDIR /src
+
+COPY go.mod go.sum ./
+RUN go mod download
+
+COPY . /src
+
+RUN apt-get update && \
+ apt-get upgrade -y ca-certificates
+
+RUN go test .
+
+RUN go build -o /src/kalamar-plugin-externalresources .
+
+# Main stage
+FROM busybox:glibc
+
+EXPOSE 5722
+
+WORKDIR /
+
+COPY --from=build /etc/ssl/certs /etc/ssl/certs
+COPY --from=build /src/kalamar-plugin-externalresources /kalamar-plugin-externalresources
+COPY --from=build /src/templates /templates
+
+ENTRYPOINT [ "./kalamar-plugin-externalresources" ]
+
+LABEL maintainer="korap@ids-mannheim.de"
+LABEL description="Docker Image for Kalamar-Plugin-ExternalResources, a frontend plugin to link texts to external resources"
+LABEL repository="https://github.com/KorAP/..."
+
+# docker build -f Dockerfile -t korap/kalamar-plugin-externalresources .
+# docker run --rm --network host -v ${PWD}/db/:/db/:z -v ${PWD}/.env:/.env korap/kalamar-plugin-externalresources
\ No newline at end of file