From 4504d963d9e48f95dcafc615ba663f67e1a73f0b Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Tue, 18 Jul 2023 16:40:24 +0330 Subject: [PATCH] Update Dockerfile (#1581) --- Dockerfile | 21 +++++++++++++-------- docker-compose.yml | 6 +----- docker-local.yml | 6 +----- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index c335f3a..7d014d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM bitnami/minideb:latest + Label MAINTAINER Amir Pourmand + RUN apt-get update -y # add locale @@ -19,17 +21,20 @@ RUN apt-get install imagemagick -y RUN apt-get install python3-pip -y RUN python3 -m pip install jupyter --break-system-packages -# clean everything -RUN apt-get clean \ - && rm -rf /var/lib/apt/lists/ -RUN pip3 cache purge - -# ENV GEM_HOME='root/gems' \ -# PATH="root/gems/bin:${PATH}" - # install jekyll and dependencies RUN gem install jekyll bundler + RUN mkdir /srv/jekyll + ADD Gemfile /srv/jekyll + WORKDIR /srv/jekyll + RUN bundle install + +# Set Jekyll environment +ENV JEKYLL_ENV=production + +EXPOSE 8080 + +CMD ["/bin/bash", "-c", "rm -f Gemfile.lock && exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace"] diff --git a/docker-compose.yml b/docker-compose.yml index e97a971..8671a4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,11 +3,7 @@ version: "3" services: jekyll: image: amirpourmand/al-folio - container_name: al-folio-website - command: bash -c " - rm -f Gemfile.lock - && bundler exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace" ports: - 8080:8080 volumes: - - .:/srv/jekyll \ No newline at end of file + - .:/srv/jekyll diff --git a/docker-local.yml b/docker-local.yml index ee332cc..87826f4 100644 --- a/docker-local.yml +++ b/docker-local.yml @@ -4,11 +4,7 @@ services: jekyll_custom: build: . image: al-folio-local-docker - container_name: al-folio-local-website - command: bash -c " - rm -f Gemfile.lock - && bundler exec jekyll serve --watch --port=8080 --host=0.0.0.0 --livereload --verbose --trace" ports: - 8080:8080 volumes: - - .:/srv/jekyll \ No newline at end of file + - .:/srv/jekyll