Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #8342: Add ARM64 architecture to Docker Builds #12904

Merged
merged 4 commits into from
Apr 25, 2023

Conversation

zacharyfleck
Copy link
Contributor

Description

Discovered today that Snipe-IT's docker image does not currently support the ARM architecture, which as many may know is becoming more prominent thanks to Apple Silicon and Amazon's Graviton processors (and similar from other cloud providers). We utilize Snipe-IT in Kubernetes and are in the process of migrating our infra over from x86_64 to ARM64 to provide cost savings and performance gains.

Currently - Attempting to run the AMD64 version of Snipe-IT in an AWS EKS cluster with node type m7g.large returns exec /startup.sh: exec format error. Adding a native ARM image, however, starts like normal with seemingly no errors. (I would like to note, however, that I did not receive the exec /startup.sh: exec format error error on my local M1 Mac)

I have tested this image to the best of my abilities to look for any issues or errors, and none have been found as of now.

Relates to #8342

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration: N/A - See Dockerfile in root of repository for relevant information.

Checklist:

@welcome
Copy link

welcome bot commented Apr 24, 2023

💖 Thanks for this pull request! 💖

We use semantic commit messages to streamline the release process and easily generate changelogs between versions. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix if it doesn't have one already.

Examples of commit messages with semantic prefixes:

  • Fixed #<issue number>: don't overwrite prevent_default if default wasn't prevented
  • Added #<issue number>: add checkout functionality to assets
  • Improved Asset Checkout: use new notification method for checkout

Things that will help get your PR across the finish line:

  • Document any user-facing changes you've made.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@what-the-diff
Copy link

what-the-diff bot commented Apr 24, 2023

PR Summary

  • Updated Docker Configuration Files
    Both docker-alpine.yml and docker.yml files were modified.
  • Added ARM64 Platform Support
    Changes were made to support both linux/amd64 and linux/arm64 platforms.

@zacharyfleck zacharyfleck changed the title Add ARM64 architecture to Docker Builds Fixed #8342: Add ARM64 architecture to Docker Builds Apr 24, 2023
Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!!!! Thank you for fixing this for us! I really appreciate it. I'll try and see if I can figure out how to test it on my own machine (which is ARM64), and get it merged up. (Our fleet for our hosted platform is pretty near to 100% Graviton2 on AWS, as well).

@zacharyfleck
Copy link
Contributor Author

I'll try and see if I can figure out how to test it on my own machine (which is ARM64)

Neat! Like I said I couldn't directly reproduce the issue in Docker on my M1 Mac, though I haven't tried spinning it up in Kubernetes locally. If you have a Graviton EKS cluster available to you at all, I was able to get it to happen there simply by running kubectl run snipe --env APP_KEY=base64key --image snipe/snipe-it and saw the issue very clearly. That of course runs without MySQL, but had the same issue on our helm deployment which first waits for MySQL to be available prior to allowing Snipe to spin up.

@zacharyfleck
Copy link
Contributor Author

@uberbrady Just realized that I need to remove the space from in between linux/amd64, linux/arm64. Making that change now.

@zacharyfleck
Copy link
Contributor Author

Fixed - Should be good to go as you see fit.

@snipe snipe merged commit a7e2182 into snipe:develop Apr 25, 2023
2 checks passed
@welcome
Copy link

welcome bot commented Apr 25, 2023

Congrats on merging your first pull request! 🎉🎉🎉

@snipe
Copy link
Owner

snipe commented Apr 25, 2023

Awesome, thank you!

@zacharyfleck
Copy link
Contributor Author

zacharyfleck commented Apr 26, 2023

@snipe @uberbrady I noticed builds randomly failed last night for the ubuntu image. Looks like it was unable to find packages, wondering if maybe it was some kind of networking error either in GitHub or Ubuntu's repos. Without making any code changes (with the exception of allowing the action to run on my fork of the repo) the build succeeded today: https://github.com/zacharyfleck/snipe-it/actions/runs/4811232692/jobs/8564946218

I have a feeling next push to develop or master will yield no issues with the docker build here.

GitHub
A free open source IT asset/license management system - should build without attempt to push? · zacharyfleck/snipe-it@adcd2e1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants