-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.aarch64
90 lines (80 loc) · 2.64 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# syntax=docker/dockerfile:1
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20 as buildstage
# set version label
ARG BUILD_DATE
ARG VERSION
ARG YOUR_SPOTIFY_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad"
RUN \
echo "**** install buildstage packages ****" && \
apk -U --update --no-cache add --virtual=build-dependencies \
build-base \
cmake \
npm \
python3-dev \
yarn && \
echo "*** install your_spotify ***" && \
if [ -z ${YOUR_SPOTIFY_VERSION+x} ]; then \
YOUR_SPOTIFY_VERSION=$(curl -sX GET "https://api.github.com/repos/Yooooomi/your_spotify/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/your_spotify.tar.gz -L \
"https://github.com/Yooooomi/your_spotify/archive/${YOUR_SPOTIFY_VERSION}.tar.gz" && \
mkdir -p /app/www && \
tar xzf \
/tmp/your_spotify.tar.gz -C \
/app/www/ --strip-components=1 && \
echo "*** install your_spotify client ***" && \
cd /app/www && \
yarn --frozen-lockfile && \
cd /app/www/apps/client && \
yarn build && \
echo "*** install your_spotify server ***" && \
cd /app/www/apps/server && \
yarn build && \
rm -rf /app/www/node_modules && \
yarn cache clean && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.20
ARG BUILD_DATE
ARG VERSION
ARG YOUR_SPOTIFY_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thespad"
ENV HOME=/app
COPY --from=buildstage /app/www/apps/client/build/ /app/www/apps/client/build/
COPY --from=buildstage /app/www/package.json /app/www/package.json
COPY --from=buildstage /app/www/yarn.lock /app/www/yarn.lock
COPY --from=buildstage /app/www/apps/server/lib/ /app/www/apps/server/lib/
COPY --from=buildstage /app/www/apps/server/package.json /app/www/apps/server/package.json
RUN \
echo "**** install build packages ****" && \
apk -U --update --no-cache add --virtual=build-dependencies \
build-base \
cmake \
python3-dev && \
echo "**** install runtime packages ****" && \
apk add -U --update --no-cache \
nodejs \
npm \
yarn && \
echo "**** install your_spotify ****" && \
cd /app/www/apps/server && \
yarn --production --frozen-lockfile && \
yarn cache clean && \
npm install -g serve && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/* \
$HOME/.cache \
$HOME/.npm
COPY /root /
EXPOSE 80 443