feat: make images arm64 compatible

This commit is contained in:
Revant Nandgaonkar
2021-01-08 17:45:22 +05:30
parent 823f960364
commit c90783d6be
7 changed files with 48 additions and 32 deletions

View File

@@ -1,13 +1,19 @@
ARG NODE_IMAGE_TAG=12-prod
ARG NODE_IMAGE_TAG=12-buster-slim
ARG GIT_BRANCH=develop
FROM bitnami/node:${NODE_IMAGE_TAG}
ARG DOCKER_REGISTRY_PREFIX=frappe
FROM node:${NODE_IMAGE_TAG}
ARG GIT_BRANCH
COPY build/erpnext-nginx/install_app.sh /install_app
RUN chmod +x /install_app && \
apt-get update -y && \
apt-get install build-essential git python2 -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN /install_app erpnext https://github.com/frappe/erpnext ${GIT_BRANCH}
FROM frappe/frappe-nginx:${GIT_BRANCH}
FROM ${DOCKER_REGISTRY_PREFIX}/frappe-nginx:${GIT_BRANCH}
COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/
COPY --from=0 /rsync /rsync

View File

@@ -10,8 +10,6 @@ mkdir -p /home/frappe/frappe-bench/sites/assets
cd /home/frappe/frappe-bench
echo -e "frappe\n${APP_NAME}" > /home/frappe/frappe-bench/sites/apps.txt
install_packages git python2
mkdir -p apps
cd apps
git clone --depth 1 https://github.com/frappe/frappe ${BRANCH}
@@ -20,9 +18,7 @@ git clone --depth 1 ${APP_REPO} ${BRANCH} ${APP_NAME}
cd /home/frappe/frappe-bench/apps/frappe
yarn
yarn production --app ${APP_NAME}
rm -fr node_modules
yarn install --production=true
yarn add node-sass
mkdir -p /home/frappe/frappe-bench/sites/assets/${APP_NAME}
cp -R /home/frappe/frappe-bench/apps/${APP_NAME}/${APP_NAME}/public/* /home/frappe/frappe-bench/sites/assets/${APP_NAME}