This repository was archived by the owner on May 26, 2023. It is now read-only.
Fix: docker failure on M1 macs #117
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's this PR do?
Fixes a bug that causes
make -f Makefile.devto fail on macs with M1 (ie. "Apple Silicon") chips.The problem appears to relate to our use of node:12-alpine in our Docker image build. The problem (and solution) is described here.
Why are we doing this? How does it help us?
An alternative solution to this bug is to just use Docker's node:12 image in our Dockerfile rather than the node:12-alpine variant. However, given the security benefits of the alpine linux distro, and its general lightweight nature, the solution in this PR is considered preferable. It allows us to continue using alpine.
How should this be manually tested?
Follow the normal steps to run this repo locally:
make db-refresh -f Makefile.dev: Using your AWS credentials, this loads a dump of the production database into your local environment.make -f Makefile.dev: Build the Docker image locally, and run a container withbashas the entrypoint.npm run build: Compile JavaScript using Webpack and TypeScript.npm run start:watch: Run the app, using Nodemon to watch for Node file changes and Webpack Dev Middleware to watch for front-end file changes./dashboard/.If everything is normal, then all is well. Preferably these steps should be followed on a mac with a M1 chip in addition to a mac with a amd64 chip.
How should this change be communicated to end users?
N/A
Are there any smells or added technical debt to note?
We should probably be using a more recent version of node (we're using 12, node is now up to version 17). However, since that upgrade might cause dependency conflicts, this PR is considered an important fix for now.
What are the relevant tickets?
Have you done the following, if applicable:
(optional: add explanation between parentheses)
TODOs / next steps: