From 5991a5905eb4591bbf652562aa40bdc781015100 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Mon, 28 Jan 2019 23:12:17 +0100 Subject: [PATCH] Ease development using docker-compose --- Dockerfile | 27 +++++++++++++++++++++++++++ README.md | 10 ++++++++++ docker-compose.yml | 12 ++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..8b519aac --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# Copyright (C) 2019 Sebastian Pipping +# Licensed under the MIT license + +FROM ruby:stretch + +ENV LC_ALL=C.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US.UTF-8 + +COPY \ + css/ \ + js/ \ + lang/ \ + _layouts/ \ + script/ \ + spec/ \ + \ + _config_local.yml \ + _config.yml \ + Gemfile \ + index.md \ + \ + /app/ + +WORKDIR /app/ +RUN bundle install +CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"] diff --git a/README.md b/README.md index 7a8f8620..f751d8a4 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,13 @@ This is the site at http://semver.org/ that describes the Semantic Versioning sp bundle exec jekyll serve ``` 4. Open http://localhost:4000. + +## Running locally with docker-compose + +If you have [docker-compose](https://docs.docker.com/compose/) installed: + +1. Build Docker image and start container instance: + ``` + docker-compose up + ``` +2. Open http://localhost:4000. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..71a2d311 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +# Copyright (C) 2019 Sebastian Pipping +# Licensed under the MIT license + +version: '3' + +services: + semver-org: + build: . + ports: + - "127.0.0.1:4000:4000" + volumes: + - .:/app/