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

alpine for docker image #1074

Merged
merged 14 commits into from
May 22, 2023
Merged

alpine for docker image #1074

merged 14 commits into from
May 22, 2023

Conversation

DariuszPorowski
Copy link
Contributor

@DariuszPorowski DariuszPorowski commented May 20, 2023

Do not see any issue for this, but somehow it may be related to #59 :)

  • docker: add alpine flavor for CI docker image
    • reduces image from ~37 MB (debian) to ~12 MB on the registry side (compressed)
    • reduces image from ~104 MB (debian) to ~30 MB on the local disk (uncompressed)
  • security: run lychee as non-root user for alpine
  • docs: add example about running lychee on Windows PowerShell
  • docs: add --rm flag to docker run command to remove container after the run (self-cleanup)
  • docs: add -w /input flag to docker run command to set working directory to /input
    • better UX when running lychee from docker locally (feeling like cli)
  • ci: tag/build/push for alpine

bonus:

@mre
Copy link
Member

mre commented May 20, 2023

Thanks @DariuszPorowski,
that's a great achievement. I personally use the Debian image as a base for custom additions, so I'd prefer if the main image stayed Debian for that reason. However, what do you think about renaming the image, such that we could support both Debian and Alpine? E.g. how about lycheeverse/lychee:0.13-alpine for example? That's also how PHP does it. (Reference)

@DariuszPorowski
Copy link
Contributor Author

Love the idea, will update PR probably later today or tomorrow :)

@DariuszPorowski
Copy link
Contributor Author

@mre tried to figure out your current docker tags

current:

latest -> debian
master -> debian
0.13 -> debian
0.13.0 -> debian
sha-1234567 -> debian

proposal for alpine:

latest-alpine -> alpine
master-alpine -> alpine
0.13-alpine -> alpine
0.13.0-alpine -> alpine
sha-1234567-alpine -> alpine

Am I missed something? :)

@DariuszPorowski DariuszPorowski changed the title alpine for docker image [wip] alpine for docker image May 20, 2023
@DariuszPorowski DariuszPorowski marked this pull request as draft May 20, 2023 22:30
@DariuszPorowski DariuszPorowski marked this pull request as ready for review May 20, 2023 23:43
@DariuszPorowski DariuszPorowski changed the title [wip] alpine for docker image alpine for docker image May 20, 2023
@mre
Copy link
Member

mre commented May 21, 2023

Yes, that's perfect. 👏 Don't think you missed any tag.

@DariuszPorowski
Copy link
Contributor Author

DariuszPorowski commented May 21, 2023

@mre so, I think the PR is ready :)

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@mre
Copy link
Member

mre commented May 22, 2023

Awesome. Just fixed a few typos (and added a comment for reference, in case you want to have a look). Other than that looks great! ✨ Merging!

@mre mre merged commit 7a35a65 into lycheeverse:master May 22, 2023
5 checks passed
@DariuszPorowski DariuszPorowski deleted the docker-alpine branch May 22, 2023 14:41
@mre
Copy link
Member

mre commented May 22, 2023

Works like a charm. Amazing PR. Thanks a lot. 🎸

@DariuszPorowski
Copy link
Contributor Author

@mre btw... just saw latest tag is bind to master branch, not sure it's the best approach ;) IMHO latest should point to the latest production release, so currently 0.13.0

@mre
Copy link
Member

mre commented May 22, 2023

🤔 you're probably right. Up for another pull request? 😅

@DariuszPorowski
Copy link
Contributor Author

@mre sure, but not this week, probably closer to end of the following one.

@mre
Copy link
Member

mre commented May 23, 2023

Of course, no rush. 👍

@mre mre added maintenance enhancement New feature or request and removed maintenance labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants