2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00

feat: make images arm64 compatible

This commit is contained in:
Revant Nandgaonkar 2021-01-05 14:47:01 +05:30
parent 77cfb50efe
commit 4f904fe3b9
5 changed files with 32 additions and 22 deletions

View File

@ -1,8 +1,8 @@
# Frappe Bench Dockerfile
FROM bitnami/minideb:latest
FROM debian:stable-slim
LABEL author=frappé
RUN install_packages \
RUN apt-get update -y && apt-get install \
git \
wkhtmltopdf \
mariadb-client \
@ -49,7 +49,9 @@ RUN install_packages \
python3-setuptools \
python3-tk \
python-virtualenv \
less
less -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales
@ -89,7 +91,7 @@ ENV NODE_VERSION=12.20.0
ENV NODE_VERSION_FRAPPEV11=10.23.0
# Install nvm with node
RUN wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
RUN wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh
RUN chmod +x install.sh
RUN ./install.sh
ENV NVM_DIR=/home/frappe/.nvm

View File

@ -1,9 +1,14 @@
ARG NODE_IMAGE_TAG=12-prod
ARG NODE_IMAGE_TAG=12-buster-slim
ARG GIT_BRANCH=develop
FROM bitnami/node:${NODE_IMAGE_TAG}
FROM node:${NODE_IMAGE_TAG}
ARG GIT_BRANCH
COPY build/erpnext-nginx/install_app.sh /install_app
COPY 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}

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}

View File

@ -2,13 +2,16 @@
# This is done to ensures that node-sass binary remains common.
# node-sass is required to enable website theme feature used
# by Website Manager role in Frappe Framework
FROM bitnami/python:3.7-prod
FROM python:3.7-slim-buster
ENV NVM_DIR=/root/.nvm
ENV NODE_VERSION=12.20.0
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN install_packages wget \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh \
RUN apt-get update -y \
&& apt-get install wget python2 git build-essential -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh \
&& chmod +x install.sh \
&& ./install.sh \
&& . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} \
@ -18,8 +21,6 @@ WORKDIR /home/frappe/frappe-bench
RUN mkdir -p /home/frappe/frappe-bench/sites \
&& echo "frappe" > /home/frappe/frappe-bench/sites/apps.txt
RUN install_packages git
ARG GIT_BRANCH=develop
RUN mkdir -p apps sites/assets/css \
&& cd apps \

View File

@ -1,4 +1,4 @@
FROM bitnami/python:3.7-prod
FROM python:3.7-slim-buster
# Add non root user without password
RUN sed -i 's/^PASS_MAX_DAYS.*/PASS_MAX_DAYS -1/' /etc/login.defs \
@ -13,28 +13,32 @@ ENV PATH="/home/frappe/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
# Install dependencies
WORKDIR /home/frappe/frappe-bench
RUN install_packages \
RUN apt-get update -y && apt-get install \
git \
mariadb-client \
postgresql-client \
gettext-base \
wget \
# for PDF
fonts-cantarell \
libffi-dev \
libjpeg-dev \
libjpeg62-turbo \
libx11-6 \
libxcb1 \
libxext6 \
libx11-6 \
libxml2 \
libxrender1 \
libssl-dev \
fonts-cantarell \
xfonts-75dpi \
xfonts-base \
zlib1g-dev \
# For psycopg2
libpq-dev \
wait-for-it \
&& wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb \
&& dpkg -i wkhtmltox_0.12.5-1.buster_amd64.deb && rm wkhtmltox_0.12.5-1.buster_amd64.deb \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh \
wait-for-it -y \
&& wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_arm64.deb \
&& dpkg -i wkhtmltox_0.12.6-1.buster_arm64.deb && rm wkhtmltox_0.12.6-1.buster_arm64.deb \
&& wget https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh \
&& apt-get purge -y wget && apt-get autoremove -y \
&& chown -R frappe:frappe /home/frappe