Skip to content

Commit

Permalink
Merge pull request #1 from unboxed/docker-setup
Browse files Browse the repository at this point in the history
Add initial Docker setup
  • Loading branch information
benbaumann95 authored Feb 29, 2024
2 parents 4fa695b + bbb415b commit 3fa948c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use an official Ruby image as a parent image
FROM ruby:latest

# Optionally set a working directory
WORKDIR /usr/src/app

# Copy the Gemfile and Gemfile.lock into the container
COPY Gemfile Gemfile.lock ./

# Install bundler for the current Ruby version, configure to install all platforms, and install dependencies
RUN gem install bundler && bundle config set --local force_ruby_platform true && bundle install

# Copy the rest of your application into the container
COPY . .

# Make port 4000 available to the world outside this container
EXPOSE 4000

# Run jekyll serve when the container launches
CMD ["bundle", "exec", "jekyll", "serve", "--host=0.0.0.0"]
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ GEM
eventmachine (1.2.7)
ffi (1.16.3)
forwardable-extended (2.6.0)
google-protobuf (3.25.1)
google-protobuf (3.25.1-arm64-darwin)
google-protobuf (3.25.1-x86_64-linux)
http_parser.rb (0.8.0)
Expand Down Expand Up @@ -64,6 +65,9 @@ GEM
rexml (3.2.6)
rouge (4.2.0)
safe_yaml (1.0.5)
sass-embedded (1.69.5)
google-protobuf (~> 3.23)
rake (>= 13.0.0)
sass-embedded (1.69.5-arm64-darwin)
google-protobuf (~> 3.23)
sass-embedded (1.69.5-x86_64-linux-gnu)
Expand All @@ -75,6 +79,7 @@ GEM

PLATFORMS
arm64-darwin-23
ruby
x86_64-linux

DEPENDENCIES
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'
services:
jekyll:
build: .
image: my-jekyll-site
command: bundle exec jekyll serve --host 0.0.0.0 --livereload --force_polling --incremental
volumes:
- .:/usr/src/app
ports:
- "4000:4000"

0 comments on commit 3fa948c

Please sign in to comment.