aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-10-19 11:05:36 +0530
committerVidhu Kant Sharma <bokuwakanojogahoshii@yahoo.com>2020-10-19 11:05:36 +0530
commit9c2ad91230d72fe6d661450cc78300ea223ae2bc (patch)
tree17bd774b3f972359dfbb46248f085bbf1c6dae98 /Dockerfile
make it better
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile21
1 files changed, 21 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..b19c2fb
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,21 @@
+FROM heroku/heroku:18-build as build
+
+COPY . /app
+WORKDIR /app
+
+# Setup buildpack
+RUN mkdir -p /tmp/buildpack/heroku/go /tmp/build_cache /tmp/env
+RUN curl https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/go.tgz | tar xz -C /tmp/buildpack/heroku/go
+
+#Execute Buildpack
+RUN STACK=heroku-18 /tmp/buildpack/heroku/go/bin/compile /app /tmp/build_cache /tmp/env
+
+# Prepare final, minimal image
+FROM heroku/heroku:18
+
+COPY --from=build /app /app
+ENV HOME /app
+WORKDIR /app
+RUN useradd -m heroku
+USER heroku
+CMD /app/bin/go-getting-started \ No newline at end of file