This project was created to test the Docker Mult Platform Build.
The application is very simple, only to run and test if it is working.
Use the docker buildx to build the application with mult-platform way.
Run the application
npm install
npm start
Test the application
curl localhost:3000/
Configure the buildx builder
docker buildx create --name mybuilder
docker buildx use mybuilder
Verify the builder
docker buildx inspect --bootstrap
Login on your docker registry.
ex for docker hub:
docker login
Execute the build with the argument: -t YOURREGISTRY/APPNAME:TAG
ex:
docker buildx build --platform linux/amd64,linux/arm64 -t gustavoapolinario/mult-platform-container:latest --push .
The command below will show informations about the image.
docker buildx imagetools inspect gustavoapolinario/mult-platform-container:latest
To be simple, let's get only the Platform from result:
docker buildx imagetools inspect gustavoapolinario/mult-platform-container:latest | grep Platform
The result:
Platform: linux/amd64
Platform: linux/arm64
You can see in docker hub the OS/ARCH supported by the image.
Go to your docker hub repository, select your app, click on the tag. The link will send you to a page with a combobox showing the image supported OS/ARCH.