diff --git a/src/services/docker-service.ts b/src/services/docker-service.ts index ce5d2a58..94bb0ad3 100644 --- a/src/services/docker-service.ts +++ b/src/services/docker-service.ts @@ -81,7 +81,7 @@ export class DockerService { options.name, options.tag ) - return `${DOCKER_COMMAND} build --platform "linux/amd64" -f ${dockerfile} -t ${dockerImageName} .` + return `${DOCKER_COMMAND} buildx build --push --platform "linux/arm64,linux/amd64" -f ${dockerfile} -t registry.entando-poc.ipponusa.com/${dockerImageName} .` } public static getBundleDockerfile( diff --git a/test/services/docker-service.test.ts b/test/services/docker-service.test.ts index f3e4ff24..c43749a4 100644 --- a/test/services/docker-service.test.ts +++ b/test/services/docker-service.test.ts @@ -48,7 +48,7 @@ describe('DockerService', () => { sinon.match({ command: DOCKER_COMMAND + - ' build --platform "linux/amd64" -f Dockerfile -t my-org/bundle-name:0.0.1 .' + ' buildx build --push --platform "linux/arm64,linux/amd64" -f Dockerfile -t registry.entando-poc.ipponusa.com/my-org/bundle-name:0.0.1 .' }) ) }) @@ -72,7 +72,7 @@ describe('DockerService', () => { sinon.match({ command: DOCKER_COMMAND + - ' build --platform "linux/amd64" -f my-Dockerfile -t my-org/bundle-name:0.0.1 .' + ' buildx build --push --platform "linux/arm64,linux/amd64" -f my-Dockerfile -t registry.entando-poc.ipponusa.com/my-org/bundle-name:0.0.1 .' }) ) }) @@ -113,7 +113,7 @@ describe('DockerService', () => { executeProcessStub, sinon.match({ command: sinon.match( - '.entando/output/Dockerfile -t my-org/test-bundle:0.0.1' + '.entando/output/Dockerfile -t registry.entando-poc.ipponusa.com/my-org/test-bundle:0.0.1' ) }) ) @@ -140,7 +140,9 @@ describe('DockerService', () => { sinon.assert.calledWith( executeProcessStub, sinon.match({ - command: sinon.match('custom-Dockerfile -t my-org/test-bundle:0.0.1') + command: sinon.match( + 'custom-Dockerfile -t registry.entando-poc.ipponusa.com/my-org/test-bundle:0.0.1' + ) }) ) const generatedDockerfile = path.resolve(