From 34698702d9acff359ed50fd5ada74bc0fb836876 Mon Sep 17 00:00:00 2001 From: Tim Ballard <1425377+timoballard@users.noreply.github.com> Date: Fri, 29 Dec 2023 15:20:04 -0600 Subject: [PATCH] Make Dockerfile work with Apple M1 (#3101) * add chromium install to Dockerfile * rm Apple_M1_Dockerfile --- backend/Apple_M1_Dockerfile | 76 ------------------------------------- backend/Dockerfile | 1 + 2 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 backend/Apple_M1_Dockerfile diff --git a/backend/Apple_M1_Dockerfile b/backend/Apple_M1_Dockerfile deleted file mode 100644 index dbad68a99e..0000000000 --- a/backend/Apple_M1_Dockerfile +++ /dev/null @@ -1,76 +0,0 @@ -FROM python:3.10-slim AS builder - -ENV PYTHONDONTWRITEBYTECODE 1 -ENV PYTHONUNBUFFERED 1 - -RUN apt-get -y update -RUN apt-get -y install git - -RUN apt-get update \ - && DEBIAN_FRONTEND=noninteractive \ - apt-get install --no-install-recommends --assume-yes \ - postgresql-client - -# RUN --mount=type=cache,target=/root/.cache \ - -WORKDIR .. - -RUN \ - apt-get update && \ - apt-get install -yqq apt-transport-https wget gnupg2 - -RUN \ - apt-get update -yq && \ - apt install build-essential curl -y && \ - apt-get install -y gcc ca-certificates gnupg && \ - mkdir -p /etc/apt/keyrings && \ - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \ - NODE_MAJOR=18 && \ - echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ - apt-get install nodejs -y && \ - apt-get install -y npm && \ - npm i -g npm@^8 - -COPY requirements.txt /tmp/requirements.txt -COPY dev-requirements.txt /tmp/dev-requirements.txt - -RUN \ - set -ex && \ - pip install --upgrade pip && \ - pip install -r /tmp/requirements.txt && \ - pip install -r /tmp/dev-requirements.txt && \ - rm -rf /root/.cache/ - -RUN \ - apt-get install -yqq groff && \ - apt-get install -yqq zip && \ - curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" && \ - unzip awscli-bundle.zip && \ - ./awscli-bundle/install -b /usr/local/bin/aws - -RUN \ - curl "https://dl.min.io/client/mc/release/linux-amd64/mc" -o "/usr/local/bin/mc" && \ - chmod +x /usr/local/bin/mc - -COPY package.* /src/ -WORKDIR /src/ - -#RUN npm install -RUN npm install -g npm@9.7.1 -RUN apt-get update -RUN apt-get install -yqq chromium -RUN npm i run-p -RUN chown -R 1001:123 "/root/.npm" - -COPY . /src/ - -RUN npm run build && python manage.py collectstatic - -# ------------------------------------------------------------ -# Dev/testing layer -# ------------------------------------------------------------ - -FROM builder AS release - -ENV PYTHONDONTWRITEBYTECODE 1 -ENV PYTHONUNBUFFERED 1 diff --git a/backend/Dockerfile b/backend/Dockerfile index 89b0f2eeb0..33c1177c6c 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -12,6 +12,7 @@ RUN apt-get -yq update && \ apt-transport-https \ build-essential \ ca-certificates \ + chromium \ curl \ git \ gcc \