Do you really need to roll your own entrypoint script? #5

Closed
opened 2025-11-20 04:14:48 -05:00 by saavagebueno · 4 comments
Owner

Originally created by @asarkar on GitHub (Nov 21, 2018).

docker-compose.yaml

volumes:
  - ./site:/srv/jekyll

Dockerfile

WORKDIR $JEKYLL_DATA_DIR

CMD ["sh","-c", "bundle install && bundle exec jekyll serve --host 0.0.0.0 --no-watch -d public"]

Is there anything more to it?

Originally created by @asarkar on GitHub (Nov 21, 2018). docker-compose.yaml ``` volumes: - ./site:/srv/jekyll ``` Dockerfile ``` WORKDIR $JEKYLL_DATA_DIR CMD ["sh","-c", "bundle install && bundle exec jekyll serve --host 0.0.0.0 --no-watch -d public"] ``` Is there anything more to it?
Author
Owner

@BretFisher commented on GitHub (Nov 26, 2018):

Hi, I'm not sure what you're getting at. Your CMD example doesn't replicate what my entrypoint script does.

@BretFisher commented on GitHub (Nov 26, 2018): Hi, I'm not sure what you're getting at. Your CMD example doesn't replicate what my entrypoint script does.
Author
Owner

@asarkar commented on GitHub (Nov 26, 2018):

First of all, I might have come across as somewhat rude, sorry about that, that wasn't the intent.

I was looking for a way to start a Jekyll server quickly and came across your repo. From what I saw, you're not doing much in the entrypoint script, except for the jekyll new, which seems to be somewhat contradictory with what you do next, i.e. look for an existing site.

I don't wanna maintain a Dockerfile, and eventually ended up with just a docker-compose.yml.

@asarkar commented on GitHub (Nov 26, 2018): First of all, I might have come across as somewhat rude, sorry about that, that wasn't the intent. I was looking for a way to start a Jekyll server quickly and came across your repo. From what I saw, you're not doing much in the entrypoint script, except for the `jekyll new`, which seems to be somewhat contradictory with what you do next, i.e. look for an existing site. I don't wanna maintain a `Dockerfile`, and eventually ended up with just a [docker-compose.yml](https://github.com/asarkar/non-compos-mentis/blob/master/docker/docker-compose.yml).
Author
Owner

@BretFisher commented on GitHub (Nov 27, 2018):

Yea that looks ruffly equivalent if you want to use the upstream image and you don't care about making new sites. You're really just trading out a Dockerfile for compose file complexity, but I like it!

My entrypoint script does two things:

  1. If you tell it to with envvar, it'll create a new site, then start server.
  2. If there is no site, give you a friendly warning on what your options are.

I don't auto create new sites as that may not be what user intended.

@BretFisher commented on GitHub (Nov 27, 2018): Yea that looks ruffly equivalent if you want to use the upstream image and you don't care about making new sites. You're really just trading out a Dockerfile for compose file complexity, but I like it! My entrypoint script does two things: 1. If you tell it to with envvar, it'll create a new site, then start server. 2. If there is no site, give you a friendly warning on what your options are. I don't auto create new sites as that may not be what user intended.
Author
Owner

@asarkar commented on GitHub (Nov 27, 2018):

I think our requirements are slightly different. I can’t get rid of the docker-compose, otherwise, I’ll have type all of it with docker run, so, having one somewhat complex file makes more sense in my case than having two moderately simpler one.
Thanks for your time.

@asarkar commented on GitHub (Nov 27, 2018): I think our requirements are slightly different. I can’t get rid of the docker-compose, otherwise, I’ll have type all of it with `docker run`, so, having one somewhat complex file makes more sense in my case than having two moderately simpler one. Thanks for your time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jekyll-serve#5