forked from Pelellone/instagram-bot.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.aarch64
50 lines (33 loc) · 1.05 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
FROM arm64v8/alpine:edge
ENV QEMU_EXECVE 1
WORKDIR /app
ADD . /app
# For cross compile on dockerhub
################################
COPY aarch64/qemu-aarch64-static /usr/bin/
COPY aarch64/resin-xbuild /usr/bin/
RUN [ "/usr/bin/qemu-aarch64-static", "/bin/sh", "-c", "ln -s resin-xbuild /usr/bin/cross-build-start; ln -s resin-xbuild /usr/bin/cross-build-end; ln /bin/sh /bin/sh.real" ]
RUN [ "cross-build-start" ]
# Install required packages
##############################
RUN apk --update add --no-cache \
nodejs \
nodejs-npm
# Install pm2
RUN npm config set unsafe-perm true \
&& npm install pm2 -g
# Install project dependencies
RUN npm install
# Cleanup
#########
RUN find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& rm -rf /var/cache/apk/*
# For cross compile on dockerhub
################################
RUN [ "cross-build-end" ]
# Set the entry point
###########################################
CMD ["pm2-runtime", "bot.js"]