From d76567f393ae997ec85ac0c16ec2885815c60865 Mon Sep 17 00:00:00 2001 From: Aldrin Navarro Date: Fri, 24 Jun 2022 10:27:30 +0800 Subject: [PATCH] Add Apple Silicon support Also in this commit: 1. Minor fixes on Dockerfile 2. Update README Signed-off-by: Aldrin Navarro --- Dockerfile | 2 +- docker-compose.yml | 1 + readme.md | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 30fa89c..dd2231a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ RUN wget -qO node.tar.xz https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64. RUN tar -xf node.tar.xz ENV PATH="/node-v8.12.0-linux-x64/bin:${PATH}" -Add . /code +ADD . /code WORKDIR /code RUN pip install -r requirements.txt diff --git a/docker-compose.yml b/docker-compose.yml index 54aa810..d42f1d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,7 @@ services: endpoint-service: build: . + platform: "linux/x86_64" volumes: - .:/code ports: diff --git a/readme.md b/readme.md index 2a8577b..8c0f71f 100644 --- a/readme.md +++ b/readme.md @@ -37,11 +37,19 @@ $ python main.py ``` You can also run the application using docker. Make sure docker and docker-compose is installed in your system -``` + +```console $ docker-compose up # the app will be running at localhost:8080 ``` +On Apple Silicon, run the following with platform-specific build + +```console +$ docker build --platform=linux/x86_64 . +[+] Building 170.5s (14/14) FINISHED +... +``` ## License