Comments (14)
Maybe we could also ditch docker hub and migrate to using GitHub Container registry in the same step? I've seen some other people implementing this like here.
from al-folio.
Maybe we could also ditch docker hub and migrate to using GitHub Container registry in the same step? I've seen some other people implementing this like here.
Does the Github Container registry solves any problem? What does it offer compared to dockerhub?
Currently, Dockerhub compresses our image from 1.3 GB to 500MB. Does it compress the image?
from al-folio.
First you should use docker compose up
to pull the image.
Then build an optimized version using:
docker-slim build --compose-file docker-compose.yml --target-compose-svc jekyll
Then, tag the image as slim:
docker image tag amirpourmand/al-folio.slim amirpourmand/al-folio:slim
Image size is reduced to 188 MBs.
from al-folio.
To Do: https://github.com/kitabisa/docker-slim-action
from al-folio.
Oh I didn't know about the compressing feature. I suggested simply because we use GitHub already, so for keeping it all up in one provider. Also Docker did a terrible job communicating changes lately, although they reverted their decisions.
from al-folio.
The slim version is now available at this URL:
docker pull ghcr.io/pourmand1376/al-folio:slim
Test it if you can. You can also change the image name in docker-compose.yml
to ghcr.io/pourmand1376/al-folio:slim
.
It is very lightweight (188 MB) compared to the standard 500MB.
from al-folio.
You can also use a one-liner to use the slim image:
docker run --rm -v "$PWD:/srv/jekyll/" -p "8080:8080" ghcr.io/pourmand1376/al-folio:slim
from al-folio.
Currently throwing an error @pourmand1376:
Dependency Error: Yikes! It looks like you don't have jekyll-get-json or one of its dependencies installed. In order to use Jekyll as currently configured, you'll need to install this gem. If you've run Jekyll with
bundle exec
, ensure that you have included the jekyll-get-json gem in your Gemfile as well. The full error message from Ruby is: 'cannot load such file -- jekyll-get-json' If you run into trouble, you can find helpful resources at https://jekyllrb.com/help/!
from al-folio.
Let's dig it. It is far more problematic than I thought.
Just, let this be open for a month or two. Perhaps, someone expert on docker does something. Otherwise, 400MB is not that much and it is okay for now.
from al-folio.
Maybe the only thing missing here is an updated docker image. The jekyll-get-json
dependency it is complaining about was recently introduced in #1547. Can you try to generate a newer version so I can check if it works? Or how can I try to create one myself? Is it just the steps you posted here?
First you should use
docker compose up
to pull the image.Then build an optimized version using:
docker-slim build --compose-file docker-compose.yml --target-compose-svc jekyll
Then, tag the image as slim:
docker image tag amirpourmand/al-folio.slim amirpourmand/al-folio:slim
Image size is reduced to 188 MBs.
from al-folio.
Maybe the only thing missing here is an updated docker image. The
jekyll-get-json
dependency it is complaining about was recently introduced in #1547. Can you try to generate a newer version so I can check if it works? Or how can I try to create one myself? Is it just the steps you posted here?First you should use
docker compose up
to pull the image.
Then build an optimized version using:docker-slim build --compose-file docker-compose.yml --target-compose-svc jekyll
Then, tag the image as slim:
docker image tag amirpourmand/al-folio.slim amirpourmand/al-folio:slim
Image size is reduced to 188 MBs.
That's true. Most probably there is an issue with a dependency or something. However, It can not be updated manually.
It should be updated automatically. As far as I know, there isn't any automatic way of using docker-slim.
from al-folio.
I have implemented docker-slim on github actions. However, it is not working very good (no error).
from al-folio.
Can we close this issue @pourmand1376?
from al-folio.
Yes. This is finished.
One thing is still left to answer. When should we make this slim version the default version? As I see, It is basically the same but less in size. However, there may be some unpredicted issues.
from al-folio.
Related Issues (20)
- docker compose up: execution expired (Net::OpenTimeout) HOT 4
- Extra whitespace on mobile
- Duplicate Blog Post causes Exception HOT 2
- Publication video embed does not work correctly HOT 1
- 'Docker compose up' takes 4 minutes HOT 13
- Unable to show modal popup on href click HOT 1
- Liquid Syntax Error in _layouts/post.liquid line 59 HOT 4
- jekyll scholar undefined method 'numeric' HOT 3
- No valid parser for XML HOT 3
- Error during GitHub Actions build HOT 6
- Actions broken-link.yml fails: too many redirects HOT 1
- Is there a way to get bibtex generated for each of my posts that people can use to cite me? HOT 2
- Date covering job title in work history on cv page. HOT 1
- Continuously report error message right after creating the repo from the template and changing the url and baseurl. HOT 6
- Docker Image CI Workflow failing HOT 14
- Social Integration Icon too large
- docker compose up fails - could not find 'jekyll-tabs' HOT 1
- "Could not find gem" when running default `docker-compose.yml` for latest `al-folio` docker image HOT 2
- scholar.google.com no longer updates new publications from my homepage HOT 3
- Installataion breaks. After changing _config.ym, action gives error! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from al-folio.