aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-07-22 08:35:37 +0000
committerFuwn <[email protected]>2021-07-22 08:35:37 +0000
commitb24b43386caa0a82e9c5c58b5c12eeffcadebd5a (patch)
treed3024dc4e7d2299027d4a581542daec6c7849586 /Dockerfile
parentchore(global): branding (diff)
downloadcapybara-b24b43386caa0a82e9c5c58b5c12eeffcadebd5a.tar.xz
capybara-b24b43386caa0a82e9c5c58b5c12eeffcadebd5a.zip
feat(docker): docker configuration
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f3e4637
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,27 @@
+FROM golang:1.16.6-alpine3.14 AS build_base
+
+RUN apk add --no-cache git
+
+WORKDIR /tmp/capybara
+
+COPY go.mod .
+
+COPY go.sum .
+
+RUN go mod download
+
+COPY . .
+
+RUN go build -o ./out/capybara .
+
+FROM alpine:3.14
+
+RUN apk add ca-certificates
+
+COPY --from=build_base /tmp/capybara/out/capybara /app/capybara
+
+WORKDIR /app
+
+EXPOSE 8080
+
+CMD ["./capybara"]