diff --git a/README.md b/README.md index fe3eafea7d..f07bf2ce9a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000000..fbb4ef35ef --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3.7" + +services: + aima_exercises: + build: . + container_name: aima_exercises_container + ports: + - "4000:4000" + volumes: + - ./:/home/app \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000000..b4de8dce93 --- /dev/null +++ b/dockerfile @@ -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" ] \ No newline at end of file diff --git a/start.sh b/start.sh new file mode 100644 index 0000000000..2aff792379 --- /dev/null +++ b/start.sh @@ -0,0 +1,3 @@ +#!/bin/bash +bundle install +bundle exec jekyll serve --host 0.0.0.0 \ No newline at end of file