From 9c2ad91230d72fe6d661450cc78300ea223ae2bc Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Mon, 19 Oct 2020 11:05:36 +0530 Subject: make it better --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') 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 -- cgit v1.2.3