Skip to content

Add arm64 build support #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions buildpack-10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN set -xe && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-12 && \
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
rm -rf /var/lib/apt/lists/* && \
# install node-prune
npm install -g node-prune && npm cache clean --force && \
Expand Down
1 change: 1 addition & 0 deletions buildpack-14/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN set -xe && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-11 && \
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
rm -rf /var/lib/apt/lists/* && \
# upgrade npm to 6.10
npm i -g [email protected] && npm cache clean --force && \
Expand Down
1 change: 1 addition & 0 deletions buildpack-15/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN set -xe && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-11 && \
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
rm -rf /var/lib/apt/lists/* && \
# upgrade npm to 6.10
npm i -g [email protected] && \
Expand Down
1 change: 1 addition & 0 deletions buildpack/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:8.16.2-jessie
# WARNING this version can't support arm64

ENV DEBIAN_VERSION_NAME jessie

Expand Down
10 changes: 6 additions & 4 deletions runtime-10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM node:10.20.1-buster-slim

ENV DEBIAN_VERSION_NAME=buster NODE_ENV=production
ENV OPENSSL_CONF=/etc/ssl/
ENV PORTCHECKER_VERSION=v1.1.0

ARG USER_NAME=hackmd
ARG UID=1500
Expand All @@ -15,12 +16,13 @@ RUN set -xe && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-12 && \
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
rm -rf /var/lib/apt/lists/* && \
# install pchecker
wget https://github.com/hackmdio/portchecker/releases/download/v1.0.5/portchecker-linux-amd64.tar.gz && \
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
rm portchecker-linux-amd64.tar.gz && \
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
# Add user and groupd
groupadd --gid $GID $USER_NAME && \
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \
Expand Down
10 changes: 6 additions & 4 deletions runtime-10/Dockerfile-cjk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM node:10.20.1-buster-slim

ENV DEBIAN_VERSION_NAME=buster NODE_ENV=production
ENV OPENSSL_CONF=/etc/ssl/
ENV PORTCHECKER_VERSION=v1.1.0

ARG USER_NAME=hackmd
ARG UID=1500
Expand All @@ -20,12 +21,13 @@ RUN set -xe && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-12 && \
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
rm -rf /var/lib/apt/lists/* && \
# install pchecker
wget https://github.com/hackmdio/portchecker/releases/download/v1.0.5/portchecker-linux-amd64.tar.gz && \
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
rm portchecker-linux-amd64.tar.gz && \
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
# Add user and groupd
groupadd --gid $GID $USER_NAME && \
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \
Expand Down
10 changes: 6 additions & 4 deletions runtime-14/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:14.17.2-buster

ENV DEBIAN_VERSION_NAME=buster NODE_ENV=production
ENV PORTCHECKER_VERSION=v1.1.0

ARG USER_NAME=hackmd
ARG UID=1500
Expand All @@ -19,12 +20,13 @@ RUN set -xe && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-11 && \
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
rm -rf /var/lib/apt/lists/* && \
# install pchecker
wget https://github.com/hackmdio/portchecker/releases/download/v1.1.0/portchecker-linux-amd64.tar.gz && \
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
rm portchecker-linux-amd64.tar.gz && \
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
# Add user and groupd
groupadd --gid $GID $USER_NAME && \
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \
Expand Down
10 changes: 6 additions & 4 deletions runtime-15/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM node:15.12.0-buster

ENV DEBIAN_VERSION_NAME=jessie NODE_ENV=production
ENV PORTCHECKER_VERSION=v1.1.0

ARG USER_NAME=hackmd
ARG UID=1500
Expand All @@ -19,12 +20,13 @@ RUN set -xe && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y --no-install-recommends postgresql-client-11 && \
if [ $(dpkg --print-architecture) = "arm64" ];then apt-get install -y --no-install-recommends phantomjs; fi && \
rm -rf /var/lib/apt/lists/* && \
# install pchecker
wget https://github.com/hackmdio/portchecker/releases/download/v1.0.5/portchecker-linux-amd64.tar.gz && \
tar xvf portchecker-linux-amd64.tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-amd64 /usr/local/bin/pcheck && \
rm portchecker-linux-amd64.tar.gz && \
wget https://github.com/hackmdio/portchecker/releases/download/${PORTCHECKER_VERSION}/portchecker-linux-$(dpkg --print-architecture).tar.gz && \
tar xvf portchecker-linux-$(dpkg --print-architecture).tar.gz -C /usr/local/bin && \
mv /usr/local/bin/portchecker-linux-$(dpkg --print-architecture) /usr/local/bin/pcheck && \
rm portchecker-linux-$(dpkg --print-architecture).tar.gz && \
# Add user and groupd
groupadd --gid $GID $USER_NAME && \
useradd --uid $UID --gid $USER_NAME --no-log-init --create-home $USER_NAME && \
Expand Down
1 change: 1 addition & 0 deletions runtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM node:8.16.2-jessie
# WARNING this version can't support arm64

ENV DEBIAN_VERSION_NAME=jessie NODE_ENV=production

Expand Down