Skip to content

Commit 78a6af6

Browse files
authored
Merge pull request datafold#9 from datafold/chiel-dat-3098-dockerized-setup-incl-dockerish-cli
[DAT-3098] Use mysql image that supports ARM and AMD
2 parents 0f70e18 + 3e545e6 commit 78a6af6

File tree

2 files changed

+9
-15
lines changed

2 files changed

+9
-15
lines changed

dev/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ services:
5858

5959
mysql:
6060
container_name: mysql
61-
image: "${MYSQL_IMAGE:-mysql}"
61+
image: mysql:oracle
6262
command: >
6363
--default-authentication-plugin=mysql_native_password
6464
--innodb-buffer-pool-size=8G

example.sh

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
#!/usr/bin/env bash
22
set -ex
33

4-
# Use a linux/arm64 docker image for MySQL when running on ARM
5-
CPU_ARCHITECTURE=$(uname -p)
6-
if [[ "${CPU_ARCHITECTURE}" == "arm" ]]; then
7-
MYSQL_IMAGE="arm64v8/mysql:oracle"
8-
fi
9-
104
main () {
115
cd dev/
126
initialize
@@ -17,27 +11,27 @@ main () {
1711
}
1812

1913
initialize() {
20-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose up -d postgres mysql
14+
docker-compose up -d postgres mysql
2115

2216
until nc -z -v -w30 localhost 3306 && nc -z -v -w30 localhost 5432; do
2317
echo "Databases not yet ready.."
2418
sleep 5
2519
done
2620

27-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose up -d xdiff prepdb
21+
docker-compose up -d xdiff prepdb
2822
}
2923

3024
prepare_db() {
3125
. ./prepdb.sh
3226
}
3327

3428
xdiff() {
35-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1 -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
36-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1 -e OPTIONS='-c timestamp --bisection-factor 4 -v' xdiff
37-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update001p -e OPTIONS='-c timestamp --bisection-factor 64 -v -s' xdiff
38-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1p -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
39-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1p -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
40-
MYSQL_IMAGE=${MYSQL_IMAGE} docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update50p -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
29+
docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1 -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
30+
docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1 -e OPTIONS='-c timestamp --bisection-factor 4 -v' xdiff
31+
docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update001p -e OPTIONS='-c timestamp --bisection-factor 64 -v -s' xdiff
32+
docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update1p -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
33+
docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_del1p -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
34+
docker-compose run -e DB1_URI=postgres://postgres:Password1@postgresql/postgres -e TABLE1_NAME=Rating -e DB2_URI=mysql://mysql:Password1@mysql/mysql -e TABLE2_NAME=Rating_update50p -e OPTIONS='-c timestamp --bisection-factor 4 -v -s' xdiff
4135
}
4236

4337
shutdown() {

0 commit comments

Comments
 (0)