Skip to content

Commit 3fd3709

Browse files
committed
Test dockerfile with aarch64
1 parent d0d47c5 commit 3fd3709

2 files changed

Lines changed: 27 additions & 1 deletion

File tree

.github/workflows/testarch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
with:
3333
arch: aarch64
3434
distro: ubuntu18.04
35-
run: docker build -t mendhak/test-image .
35+
run: docker build -f Dockerfile.aarch64 -t mendhak/test-image .

Dockerfile.aarch64

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM --platform=linux/arm64 arm64v8/node:14-alpine AS build
2+
3+
WORKDIR /app
4+
COPY . /app
5+
6+
RUN set -ex \
7+
# Build JS-Application
8+
&& npm install --production \
9+
# Generate SSL-certificate (for HTTPS)
10+
&& apk --no-cache add openssl \
11+
&& sh generate-cert.sh \
12+
&& apk del openssl \
13+
&& rm -rf /var/cache/apk/* \
14+
# Delete unnecessary files
15+
&& rm package* generate-cert.sh \
16+
# Correct User's file access
17+
&& chown -R node:node /app \
18+
&& chmod +r /app/privkey.pem
19+
20+
FROM --platform=linux/arm64 arm64v8/node:14-alpine AS final
21+
WORKDIR /app
22+
COPY --from=build /app /app
23+
ENV HTTP_PORT=8080 HTTPS_PORT=8443
24+
EXPOSE $HTTP_PORT $HTTPS_PORT
25+
USER 1000
26+
CMD ["node", "./index.js"]

0 commit comments

Comments
 (0)