-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Add Dockerfile for gh-pages site #8494
base: gh-pages
Are you sure you want to change the base?
Conversation
Avoid having to faff with local dependencies. docker-compose build docker-compose up open http://0.0.0.0:4000
FROM ruby:3.2 | ||
|
||
WORKDIR /app | ||
COPY . . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think we need a .dockerignore file as when building the image the whole current directory is copied into the image, which in my case is gigabytes in size!
Something like:
.*
cache/
commonlib/
config/
coverage/
db/
files/
gems/
lib/
public/
storage/
tmp/
WORKDIR /app | ||
COPY . . | ||
|
||
RUN gem install bundler jekyll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No point in this as its already in the Gemfile.lock and could install a different versions than we're really using.
RUN gem install bundler jekyll |
@@ -0,0 +1,11 @@ | |||
FROM ruby:3.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets keep the image and small as possible
FROM ruby:3.2 | |
FROM ruby:3.2-slim | |
RUN apt-get update -qq && \ | |
apt-get install -y \ | |
build-essential \ | |
git \ | |
&& rm -rf /var/lib/apt/lists/* |
|
||
EXPOSE 4000 | ||
|
||
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be good, if it works?
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"] | |
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0", "--livereload"] |
version: '3.8' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docker warns against including a version now. We should remove.
version: '3.8' |
Add Dockerfile
Avoid having to faff with local dependencies.
[skip changelog]