swagger-editor
swagger-editor copied to clipboard
Build Docker image for arm platform
Hello,
In order to not run the swagger-editor using amd64 emulation on Apple silicon ( or any other arm platform ) , it'd be great to have Travis building a multi architecture docker image.
I tried the current Dockerfile build from my mac and the build went pretty well.
Building multi arch should be as simple as running docker buildx
instead of docker build.
something like :
docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --push --tag $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG --tag $DOCKER_IMAGE_NAME:latest .
instead of
docker build -t $DOCKER_IMAGE_NAME .;
docker tag $DOCKER_IMAGE_NAME $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG;
docker push $DOCKER_IMAGE_NAME:$DOCKER_IMAGE_TAG;
docker tag $DOCKER_IMAGE_NAME $DOCKER_IMAGE_NAME:latest;
docker push $DOCKER_IMAGE_NAME:latest;
in https://github.com/swagger-api/swagger-editor/blob/master/build-tools/deploy-docker-hub-tag.sh
I'm happy submitting a PR but I'm pretty sure that Travis won't let me run that kind of things :)
Any update on this? Always a pain to hit a hard wall because a provider hasn't built to support arm64 with buildx
:(
While I can build the image on ARM64 (Ubuntu on RPi), I cannot successfully deploy it. All I get is an nginx error when accessing the container's service at internal port 8080. Hmpf.
Any update? I cant run this image on the new M1 Apple chips
In the meantime I have built some of the swagger tools, as per the buildx instructions above.
Images
-
expend/swagger-editor
built againstswagger-editor-3.18.2
-
expend/swagger-ui
built againstswagger-ui-3.52.5
-
expend/swagger-codegen-cli
built againstswagger-codegen-2.4.23
@expelledboy Could you also build the v3 version for arm64? swagger-codegen-cli-v3
Its not entirely obvious to me how to build swagger-codegen-cli-v3
If you just need a quick fix to run the editor locally:
- Checkout the repo
- Build it using
docker buildx build --platform linux/arm64/v8 --tag swagger-editor:v1 --tag swagger-editor:latest .
- Start it using
docker run -d -p 80:8080 swagger-editor:v1
Are there any plans on adding this?
Similar to the above, this helped me on an M1 Mac:
docker run -d -p 80:8080 --platform linux/amd64 swaggerapi/swagger-editor
Similar to the above, this helped me on an M1 Mac:
docker run -d -p 80:8080 --platform linux/amd64 swaggerapi/swagger-editor
UR my hero!