-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (35 loc) · 1.03 KB
/
Dockerfile
File metadata and controls
41 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# syntax=docker/dockerfile:1
ARG STACK_VERSION=24
FROM golang:1.26 AS builder
RUN mkdir /src
COPY . /src/
WORKDIR /src
ARG VERSION
RUN go build -a -ldflags "-X main.Version=$VERSION" -o herokuish .
FROM heroku/heroku:${STACK_VERSION}-build AS base
ARG STACK_VERSION=24
ARG TARGETARCH
ENV STACK=heroku-$STACK_VERSION
ENV DEBIAN_FRONTEND=noninteractive
LABEL com.gliderlabs.herokuish/stack=$STACK
USER root
# for setuidgid (daemontools) and optional /dev/random seeding (rng-tools5)
COPY bin/apt-install /usr/local/bin/apt-install
COPY --from=builder /src/herokuish /bin/
RUN apt-install daemontools rng-tools5 && \
/bin/herokuish buildpack install \
&& ln -s /bin/herokuish /build \
&& ln -s /bin/herokuish /start \
&& ln -s /bin/herokuish /exec \
&& cd /tmp/buildpacks \
&& rm -rf \
*/.git \
*/.github \
*/changelogs \
*/spec \
*/builds \
*/test \
*/tmp
COPY include/default_user.bash /tmp/default_user.bash
RUN bash /tmp/default_user.bash && rm -f /tmp/default_user.bash
ENV BASH_BIN=/usr/bin/bash