forked from erdnaxeli/castblock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.aarch64
30 lines (28 loc) · 949 Bytes
/
Dockerfile.aarch64
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
FROM --platform=linux/arm64/v8 alpine:3.16 AS crystal
WORKDIR /src
RUN echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >>/etc/apk/repositories
RUN apk add --update --no-cache --force-overwrite \
crystal \
make \
openssl-dev \
openssl-libs-static \
shards \
yaml-dev \
yaml-static \
zlib-dev \
zlib-static
COPY shard.yml shard.lock /src/
RUN shards install --production
COPY src /src/src
RUN shards build --production --static --release
FROM golang:alpine AS golang
RUN apk add git
RUN git clone https://github.com/vishen/go-chromecast.git && cd go-chromecast && git checkout d2b4deef
ARG GOOS=linux
ARG GOARCH=arm64
RUN cd go-chromecast && go build -o /go/bin/go-chromecast
FROM --platform=linux/arm64/v8 alpine:latest
RUN apk add tini
COPY --from=crystal /src/bin/castblock /usr/bin/castblock
COPY --from=golang /go/bin/go-chromecast /usr/bin/go-chromecast
ENTRYPOINT ["/sbin/tini", "--", "/usr/bin/castblock"]