Skip to content

Commit 18c1298

Browse files
author
Edward Muller
committed
WIP
1 parent 27d28b4 commit 18c1298

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

Diff for: Dockerfile

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
FROM alpine:latest
1+
FROM heroku/heroku:16-build as build
22

3-
MAINTAINER Edward Muller <[email protected]>
3+
COPY . /app
4+
WORKDIR /app
45

5-
WORKDIR "/opt"
6+
# Setup buildpack
7+
RUN mkdir -p /tmp/buildpack/heroku/go /tmp/build_cache /tmp/env
8+
RUN curl https://codon-buildpacks.s3.amazonaws.com/buildpacks/heroku/go.tgz | tar xz -C /tmp/buildpack/heroku/go
69

7-
ADD .docker_build/go-getting-started /opt/bin/go-getting-started
8-
ADD ./templates /opt/templates
9-
ADD ./static /opt/static
10+
#Execute Buildpack
11+
RUN STACK=heroku-16 /tmp/buildpack/heroku/go/bin/compile /app /tmp/build_cache /tmp/env
1012

11-
CMD ["/opt/bin/go-getting-started"]
13+
# Prepare final, minimal image
14+
FROM heroku/heroku:16
1215

16+
COPY --from=build /app /app
17+
ENV HOME /app
18+
WORKDIR /app
19+
RUN useradd -m heroku
20+
USER heroku
21+
CMD /app/bin/go-getting-started

Diff for: heroku.yml

-6
This file was deleted.

0 commit comments

Comments
 (0)