File tree 2 files changed +16
-13
lines changed
2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM alpine:latest
1
+ FROM heroku/heroku:16-build as build
2
2
3
- MAINTAINER Edward Muller <
[email protected] >
3
+ COPY . /app
4
+ WORKDIR /app
4
5
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
6
9
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
10
12
11
- CMD ["/opt/bin/go-getting-started" ]
13
+ # Prepare final, minimal image
14
+ FROM heroku/heroku:16
12
15
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
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments