Skip to content

Commit dfe2060

Browse files
authored
Merge pull request #3 from YadominJinta/master
Add arm64 build support
2 parents 8f860fa + 38d154c commit dfe2060

File tree

9 files changed

+29
-16
lines changed

9 files changed

+29
-16
lines changed

buildpack-10/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ RUN set -xe && \
1414
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
1515
apt-get update && \
1616
apt-get install -y --no-install-recommends postgresql-client-12 && \
17+
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
1718
rm -rf /var/lib/apt/lists/* && \
1819
# install node-prune
1920
npm install -g node-prune && npm cache clean --force && \

buildpack-14/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ RUN set -xe && \
1414
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
1515
apt-get update && \
1616
apt-get install -y --no-install-recommends postgresql-client-11 && \
17+
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
1718
rm -rf /var/lib/apt/lists/* && \
1819
# upgrade npm to 6.10
1920
npm i -g [email protected] && npm cache clean --force && \

buildpack-15/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ RUN set -xe && \
1414
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
1515
apt-get update && \
1616
apt-get install -y --no-install-recommends postgresql-client-11 && \
17+
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
1718
rm -rf /var/lib/apt/lists/* && \
1819
# upgrade npm to 6.10
1920
npm i -g [email protected] && \

buildpack/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM node:8.16.2-jessie
2+
# WARNING this version can't support arm64
23

34
ENV DEBIAN_VERSION_NAME jessie
45

runtime-10/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM node:10.20.1-buster-slim
22

33
ENV DEBIAN_VERSION_NAME=buster NODE_ENV=production
44
ENV OPENSSL_CONF=/etc/ssl/
5+
ENV PORTCHECKER_VERSION=v1.1.0
56

67
ARG USER_NAME=hackmd
78
ARG UID=1500
@@ -15,12 +16,13 @@ RUN set -xe && \
1516
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
1617
apt-get update && \
1718
apt-get install -y --no-install-recommends postgresql-client-12 && \
19+
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
1820
rm -rf /var/lib/apt/lists/* && \
1921
# install pchecker
20-
wget https://github.com/hackmdio/portchecker/releases/download/v1.0.5/portchecker-linux-amd64.tar.gz && \
21-
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
22-
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
23-
rm portchecker-linux-amd64.tar.gz && \
22+
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
23+
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
24+
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
25+
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
2426
# Add user and groupd
2527
groupadd --gid $GID $USER_NAME && \
2628
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \

runtime-10/Dockerfile-cjk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM node:10.20.1-buster-slim
22

33
ENV DEBIAN_VERSION_NAME=buster NODE_ENV=production
44
ENV OPENSSL_CONF=/etc/ssl/
5+
ENV PORTCHECKER_VERSION=v1.1.0
56

67
ARG USER_NAME=hackmd
78
ARG UID=1500
@@ -20,12 +21,13 @@ RUN set -xe && \
2021
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
2122
apt-get update && \
2223
apt-get install -y --no-install-recommends postgresql-client-12 && \
24+
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
2325
rm -rf /var/lib/apt/lists/* && \
2426
# install pchecker
25-
wget https://github.com/hackmdio/portchecker/releases/download/v1.0.5/portchecker-linux-amd64.tar.gz && \
26-
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
27-
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
28-
rm portchecker-linux-amd64.tar.gz && \
27+
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
28+
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
29+
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
30+
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
2931
# Add user and groupd
3032
groupadd --gid $GID $USER_NAME && \
3133
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \

runtime-14/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM node:14.17.2-buster
22

33
ENV DEBIAN_VERSION_NAME=buster NODE_ENV=production
4+
ENV PORTCHECKER_VERSION=v1.1.0
45

56
ARG USER_NAME=hackmd
67
ARG UID=1500
@@ -19,12 +20,13 @@ RUN set -xe && \
1920
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
2021
apt-get update && \
2122
apt-get install -y --no-install-recommends postgresql-client-11 && \
23+
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
2224
rm -rf /var/lib/apt/lists/* && \
2325
# install pchecker
24-
wget https://github.com/hackmdio/portchecker/releases/download/v1.1.0/portchecker-linux-amd64.tar.gz && \
25-
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
26-
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
27-
rm portchecker-linux-amd64.tar.gz && \
26+
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
27+
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
28+
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
29+
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
2830
# Add user and groupd
2931
groupadd --gid $GID $USER_NAME && \
3032
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \

runtime-15/Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM node:15.12.0-buster
22

33
ENV DEBIAN_VERSION_NAME=jessie NODE_ENV=production
4+
ENV PORTCHECKER_VERSION=v1.1.0
45

56
ARG USER_NAME=hackmd
67
ARG UID=1500
@@ -19,12 +20,13 @@ RUN set -xe && \
1920
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
2021
apt-get update && \
2122
apt-get install -y --no-install-recommends postgresql-client-11 && \
23+
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
2224
rm -rf /var/lib/apt/lists/* && \
2325
# install pchecker
24-
wget https://github.com/hackmdio/portchecker/releases/download/v1.0.5/portchecker-linux-amd64.tar.gz && \
25-
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
26-
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
27-
rm portchecker-linux-amd64.tar.gz && \
26+
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
27+
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
28+
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
29+
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
2830
# Add user and groupd
2931
groupadd --gid $GID $USER_NAME && \
3032
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \

runtime/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM node:8.16.2-jessie
2+
# WARNING this version can't support arm64
23

34
ENV DEBIAN_VERSION_NAME=jessie NODE_ENV=production
45

0 commit comments

Comments
 (0)