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

Dockerfile updates and Fixes to CI process #17

Merged
merged 8 commits into from
Nov 19, 2023
Merged

Dockerfile updates and Fixes to CI process #17

merged 8 commits into from
Nov 19, 2023

Conversation

gaby
Copy link
Contributor

@gaby gaby commented Nov 19, 2023

  • Updated base image to 20-alpine, the 20.0.0-alpine hasn't been updated in 8 months.
  • Using a full image name will allow dependabot to track updates
  • Removed target: release from CI file. This is a carry-over from my re-using my CI files

@lllllllillllllillll This PR fixes the CI issues introduced in #16

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

I think what's happening is that some of your dependencies are made to work with glibc, and in Alpine they have to be recompiled. The base image should be 20-slim to avoid that issue

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

The last 2 major releases of Node with Debian only support arm/v8 and arm/v7, arm/v6 was deprecated several years ago.

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

Using arm/v7 won't work. It uses too many resources to compile the code with those dependencies using gyp and alpine. Build with amd64, arm/v8 work fast within minutes

Copy link
Owner

@lllllllillllllillll lllllllillllllillll left a comment

Choose a reason for hiding this comment

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

I think we still need the COPY and EXPOSE commands:

COPY . .
EXPOSE 8000

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll They still there, the diff doesn't show them. See file here: https://github.com/gaby/DweebUI/blob/docker-fixes/Dockerfile

Copy link
Owner

@lllllllillllllillll lllllllillllllillll left a comment

Choose a reason for hiding this comment

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

Looks good!

@lllllllillllllillll lllllllillllllillll merged commit 53ea6a8 into lllllllillllllillll:main Nov 19, 2023
1 check passed
@gaby gaby deleted the docker-fixes branch November 19, 2023 18:48
@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll You have to enable Package Registry in this repo. Let me find the instructions for that.

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll Go here https://github.com/lllllllillllllillll/DweebUI/settings/actions at the bottom change the workflow permissions to this:

image

Then re-run the failed workflow from here: https://github.com/lllllllillllllillll/DweebUI/actions/runs/6922322719 and it should publish the image as: ghcr.io/lllllllillllllillll/DweebUI:main

@lllllllillllllillll
Copy link
Owner

@gaby

Success!
Thank you.

@lllllllillllllillll lllllllillllllillll self-assigned this Nov 19, 2023
@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll On the packages page, on the right side it says "Package Setting". Allow public to see them, by default they are hidden.

@lllllllillllllillll
Copy link
Owner

You should see the newest built package now.

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

You should see the newest built package now.

I do! Awesome! 💪💪💪

@lllllllillllllillll
Copy link
Owner

I think I need to enable dependabot alerts as well now.

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

I think I need to enable dependabot alerts as well now.

Yes, they are disable by default. Haha 😂 you will get quite a few PR's few minutes after enabling them

@lllllllillllllillll
Copy link
Owner

I've enabled dependabot alerts, but I'm not sure how to confirm it's using the dependabot.yml file.

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll Give it like 10mins, all you need to do is click "enable" in the dependabot section of the project settings

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

Under https://github.com/lllllllillllllillll/DweebUI/settings/security_analysis

Enable the 3 options that say "Dependabot"

@lllllllillllllillll
Copy link
Owner

Yep, enabled.
I'll just wait to see it run.

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.

2 participants