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

Add docker configuration #416

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ The present version of AIMA-Exercises uses Jekyll 3 and Ruby 2.5.
- [Windows](https://jekyllrb.com/docs/installation/windows/)
4. Clone the project locally.
5. Go to the folder directory where you cloned the project in the terminal.
6. `gem install Jekyll bundler `
7. `bundle exec Jekyll serve`
6. `gem install jekyll bundler `
7. `bundle exec jekyll serve`
**To run the project linside docker**:
1. Install [docker](https://docs.docker.com/get-docker/)
2. Clone the project locally.
3. Go to the folder directory where you cloned the project in the terminal.
4. run docker-compose build
5. run docker-compose run --rm --service-ports aima_exercises
6. open http://127.0.0.1:4000/


**The directory structure is as follows:**
* `_includes` - The include tag allows you to include the content from another file stored in the `_includes` folder and contains reusable files like `staticman_comments.html` which is the form used for submitting answers. Sidebar templates, head.html, and breadcrumb.
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.7"

services:
aima_exercises:
build: .
container_name: aima_exercises_container
ports:
- "4000:4000"
volumes:
- ./:/home/app
8 changes: 8 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ruby:2.5.9
WORKDIR /home/app

RUN gem install rails bundler
RUN gem install rails
RUN gem install jekyll bundler

ENTRYPOINT [ "/home/app/start.sh" ]
3 changes: 3 additions & 0 deletions start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
bundle install
bundle exec jekyll serve --host 0.0.0.0