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

Use Node.js v14 for Docker image, not the latest one (v15) #817

Merged
merged 1 commit into from
Feb 7, 2021
Merged

Use Node.js v14 for Docker image, not the latest one (v15) #817

merged 1 commit into from
Feb 7, 2021

Conversation

Tenzer
Copy link
Contributor

@Tenzer Tenzer commented Feb 7, 2021

This fixes building of the Docker image, which otherwise fails because the node-canvas dependency doesn't have a prebuilt version available for Node.js v15, and the image doesn't have the necessary system-level dependencies to
build it from source.

Using Node.js v14 (the latest LTS version) fixes this as we then can use the prebuilt node-canvas binary.

As a bonus I have also added clearing of the NPM cache after installing packages, this will decrease the final image size slightly.

This fixes building of the Docker image, which otherwise fails because the
node-canvas dependency doesn't have a prebuilt version available for Node.js
v15, and the image doesn't have the necessary system-level dependencies to
build it from source.

Using Node.js v14 (the latest LTS version) fixes this as we then can use the
prebuilt node-canvas binary.

As a bonus I have also added clearing of the NPM cache after installing
packages, this will decrease the final image size slightly.
@Tenzer
Copy link
Contributor Author

Tenzer commented Feb 7, 2021

I believe this is the reason the Docker image at https://hub.docker.com/r/assetgraph/assetgraph-builder hasn't been updated for two years and is stuck on assetgraph-builder version 6.4.3.

@papandreou
Copy link
Member

Thanks, Jeppe!

I haven't really used the docker image myself -- it doesn't look like it's wired up to build and push those images on CI? How would you usually do that?

@papandreou papandreou merged commit 2e7ae92 into assetgraph:master Feb 7, 2021
@Tenzer
Copy link
Contributor Author

Tenzer commented Feb 7, 2021

The easiest way to do it is probably to set up an automated build in Docker Hub. It will then trigger a new build every time a change is merged into the repository: https://docs.docker.com/docker-hub/builds/. You don't need to build the image yourself, Docker Hub has a build system to do that for you.

@papandreou
Copy link
Member

Maybe you can help with that? 🤗

@Tenzer
Copy link
Contributor Author

Tenzer commented Feb 13, 2021

I'm willing to give it a try, but I would then need some permissions both on Docker Hub and GitHub to get that configured, I think.

@papandreou
Copy link
Member

Cool! I've invited you to the github org now, but I'm not sure how we're set up on Docker Hub. Seems like my Docker Hub user doesn't have access to anything related to assetgraph.

@Munter, do you know how it's wired up?

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

Successfully merging this pull request may close these issues.

None yet

2 participants