-
Notifications
You must be signed in to change notification settings - Fork 179
/
Dockerfile.arm
44 lines (29 loc) · 1.34 KB
/
Dockerfile.arm
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
42
43
44
## package #####################################################################
FROM golang:1.18 AS package
RUN apt-get update && apt-get -y install upx-ucl
WORKDIR /go/src/github.com/convox/rack
COPY . /go/src/github.com/convox/rack
RUN make package build compress
## production ##################################################################
FROM ubuntu:22.04
ARG DOCKER_ARCH=aarch64
ARG KUBECTL_ARCH=arm64
RUN apt-get -qq update && apt-get -qq -y install curl
RUN curl -s https://download.docker.com/linux/static/stable/${DOCKER_ARCH}/docker-18.03.1-ce.tgz | \
tar -C /usr/bin --strip-components 1 -xz
RUN curl -Ls https://storage.googleapis.com/kubernetes-release/release/v1.13.0/bin/linux/${KUBECTL_ARCH}/kubectl -o /usr/bin/kubectl && \
chmod +x /usr/bin/kubectl
ENV DEVELOPMENT=false
ENV GOPATH=/go
ENV PATH=$PATH:/go/bin
WORKDIR /rack
COPY --from=package /go/bin/atom /go/bin/
COPY --from=package /go/bin/build /go/bin/
COPY --from=package /go/bin/convox-env /go/bin/
COPY --from=package /go/bin/monitor /go/bin/
COPY --from=package /go/bin/rack /go/bin/
COPY --from=package /go/bin/router /go/bin/
# aws templates
COPY --from=package /go/src/github.com/convox/rack/provider/aws/formation/ provider/aws/formation/
COPY --from=package /go/src/github.com/convox/rack/provider/aws/templates/ provider/aws/templates/
CMD ["/go/bin/rack"]