Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3502779
D4375.id14009.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D4375.id14009.diff
View Options
diff --git a/services/backup/Dockerfile b/services/backup/Dockerfile
--- a/services/backup/Dockerfile
+++ b/services/backup/Dockerfile
@@ -1,4 +1,5 @@
-FROM commapp/services-base:1.1
+ARG COMM_BASE_IMAGE_M1_SUFFIX
+FROM commapp/services-base:1.1${COMM_BASE_IMAGE_M1_SUFFIX}
RUN apt-get update && \
apt-get install -y uuid-dev && \
diff --git a/services/blob/Dockerfile b/services/blob/Dockerfile
--- a/services/blob/Dockerfile
+++ b/services/blob/Dockerfile
@@ -1,4 +1,5 @@
-FROM commapp/services-base:1.1
+ARG COMM_BASE_IMAGE_M1_SUFFIX
+FROM commapp/services-base:1.1${COMM_BASE_IMAGE_M1_SUFFIX}
RUN apt-get update && \
apt-get install -y uuid-dev && \
diff --git a/services/docker-compose.yml b/services/docker-compose.yml
--- a/services/docker-compose.yml
+++ b/services/docker-compose.yml
@@ -11,6 +11,7 @@
dockerfile: services/tunnelbroker/Dockerfile
context: ../
args:
+ - COMM_BASE_IMAGE_M1_SUFFIX=${COMM_BASE_IMAGE_M1_SUFFIX}
- COMM_TEST_SERVICES=${COMM_TEST_SERVICES}
- COMM_SERVICES_DEV_MODE=${COMM_SERVICES_DEV_MODE}
image: commapp/tunnelbroker-server:0.2
@@ -29,6 +30,7 @@
dockerfile: services/backup/Dockerfile
context: ../
args:
+ - COMM_BASE_IMAGE_M1_SUFFIX=${COMM_BASE_IMAGE_M1_SUFFIX}
- COMM_TEST_SERVICES=${COMM_TEST_SERVICES}
- COMM_SERVICES_DEV_MODE=${COMM_SERVICES_DEV_MODE}
image: commapp/backup-server:0.1
@@ -44,6 +46,7 @@
dockerfile: services/blob/Dockerfile
context: ../
args:
+ - COMM_BASE_IMAGE_M1_SUFFIX=${COMM_BASE_IMAGE_M1_SUFFIX}
- COMM_TEST_SERVICES=${COMM_TEST_SERVICES}
- COMM_SERVICES_DEV_MODE=${COMM_SERVICES_DEV_MODE}
image: commapp/blob-server:0.1
diff --git a/services/scripts/build_base_image.sh b/services/scripts/build_base_image.sh
--- a/services/scripts/build_base_image.sh
+++ b/services/scripts/build_base_image.sh
@@ -7,5 +7,10 @@
exit 1
fi
-tag=${1:-"1.1"}
+TAG="1.1"
+if [[ $(uname -m) == 'arm64' ]]; then
+ TAG="$TAG.m1"
+fi
+
+tag=${1:-$TAG}
docker build -t commapp/services-base:${tag} base-image
diff --git a/services/scripts/run_server_image.sh b/services/scripts/run_server_image.sh
--- a/services/scripts/run_server_image.sh
+++ b/services/scripts/run_server_image.sh
@@ -29,5 +29,9 @@
exit 1
fi
+if [[ $(uname -m) == 'arm64' ]]; then
+ export COMM_BASE_IMAGE_M1_SUFFIX=".m1"
+fi
+
docker-compose build $SERVICE-server
docker-compose up $SERVICE-server
diff --git a/services/tunnelbroker/Dockerfile b/services/tunnelbroker/Dockerfile
--- a/services/tunnelbroker/Dockerfile
+++ b/services/tunnelbroker/Dockerfile
@@ -1,4 +1,5 @@
-FROM commapp/services-base:1.1
+ARG COMM_BASE_IMAGE_M1_SUFFIX
+FROM commapp/services-base:1.1${COMM_BASE_IMAGE_M1_SUFFIX}
ARG MAKE_JOBS=4
ENV MAKEFLAGS="-j${MAKE_JOBS}"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 5:07 AM (18 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2685997
Default Alt Text
D4375.id14009.diff (2 KB)
Attached To
Mode
D4375: [services] Build arm containers for m1 mac
Attached
Detach File
Event Timeline
Log In to Comment