temporalio / docker-builds

Temporal service Docker images build
https://hub.docker.com/r/temporaliotest/auto-setup
MIT License
30 stars 59 forks source link

Fix platform verification #228

Closed stephanos closed 4 months ago

stephanos commented 4 months ago

What was changed

Checking the binaries without running the Docker container.

Example output:

verifying binaries in '/usr/local/bin' from 'temporaliotest/admin-tools:sha-05ac5b8' for platform 'linux/arm64' are 'ARM'

>  docker create --name bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ --platform linux/arm64 temporaliotest/admin-tools:sha-05ac5b8
Unable to find image 'temporaliotest/admin-tools:sha-05ac5b8' locally
sha-05ac5b8: Pulling from temporaliotest/admin-tools
Digest: sha256:3dc1f7ae18a0382d57cd6f75d69bfba4cce7b2f31199a9d097c411afc7b38c7d
Status: Downloaded newer image for temporaliotest/admin-tools:sha-05ac5b8
e22bfda97164763452dfbac597767d427e434571cd1c69598cb943259d5a7373

>  docker cp bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ:/usr/local/bin/. /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ2816749683

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ2816749683/tctl
tctl is ARM

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ2816749683/tctl-authorization-plugin
tctl-authorization-plugin is ARM

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ2816749683/tdbg
tdbg is ARM

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ2816749683/temporal
temporal is ARM

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ2816749683/temporal-cassandra-tool
temporal-cassandra-tool is ARM

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYXJtNjQtMTcyMDcxOTk3MDU0OQ2816749683/temporal-sql-tool
temporal-sql-tool is ARM

verifying binaries in '/usr/local/bin' from 'temporaliotest/admin-tools:sha-05ac5b8' for platform 'linux/amd64' are 'x86'

>  docker create --name bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ --platform linux/amd64 temporaliotest/admin-tools:sha-05ac5b8
Unable to find image 'temporaliotest/admin-tools:sha-05ac5b8' locally
sha-05ac5b8: Pulling from temporaliotest/admin-tools
Digest: sha256:3dc1f7ae18a0382d57cd6f75d69bfba4cce7b2f31199a9d097c411afc7b38c7d
Status: Downloaded newer image for temporaliotest/admin-tools:sha-05ac5b8
d94c61fee08f7363197daa5fb2d73fba019857592754aa5489fde40f601ad5a7

>  docker cp bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ:/usr/local/bin/. /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ233242614

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ233242614/tctl
tctl is x86

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ233242614/tctl-authorization-plugin
tctl-authorization-plugin is x86

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ233242614/tdbg
tdbg is x86

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ233242614/temporal
temporal is x86

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ233242614/temporal-cassandra-tool
temporal-cassandra-tool is x86

>  file /var/folders/4w/5qdjw8sd6417nldg5pvhs_rr0000gn/T/bGludXgvYW1kNjQtMTcyMDcxOTk3MjkzOQ233242614/temporal-sql-tool
temporal-sql-tool is x86

Why?

Running the Docker container requires more setup for separate x86 and ARM environments. This way is easier.

Checklist

  1. Closes

  2. How was this tested:

  3. Any docs updates needed?