From 8431acc1d59b0600df946cd2f0a4d13bbe6742b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Mon, 5 Dec 2016 14:49:00 +0100 Subject: [PATCH 1/5] added support for DISCOURSE_ADDITIONAL_PLUGINS build arg --- Dockerfile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 377cb8f..aa4e46c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ENV DISCOURSE_VERSION=1.7.0.beta3 \ DISCOURSE_SERVE_STATIC_ASSETS=true \ GIFSICLE_VERSION=1.87 \ PNGQUANT_VERSION=2.4.1 - + RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - \ && apt-get update && apt-get install -y --no-install-recommends \ autoconf \ @@ -46,6 +46,22 @@ RUN git clone --branch v${DISCOURSE_VERSION} https://github.com/discourse/discou && git remote set-branches --add origin tests-passed \ && bundle config build.nokogiri --use-system-libraries \ && bundle install --deployment --without test --without development + + +# install discourse plugins +# assumptions: no spaces in URLs (urlencoding is a thing) +# +# this expects a git-cloneable link +ARG DISCOURSE_ADDITIONAL_PLUGINS= +RUN if [ "$DISCOURSE_ADDITIONAL_PLUGINS" != "" ]; then \ + cd plugins/ \ + for PACKAGE_LINK in $DISCOURSE_ADDITIONAL_PLUGINS; do \ + git clone "$PACKAGE_LINK"; \ + done; \ + bundle exec rake plugin:update plugin=discourse-plugin-checklist; \ + bundle exec rake assets:clean; \ + bundle exec rake assets:precompile; \ + fi EXPOSE 3000 CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"] -- GitLab From cb49ffa023ee832a167be8490646db2350b47510 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Mon, 5 Dec 2016 15:14:14 +0100 Subject: [PATCH 2/5] bugfix --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index aa4e46c..bbc49fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,13 +54,12 @@ RUN git clone --branch v${DISCOURSE_VERSION} https://github.com/discourse/discou # this expects a git-cloneable link ARG DISCOURSE_ADDITIONAL_PLUGINS= RUN if [ "$DISCOURSE_ADDITIONAL_PLUGINS" != "" ]; then \ - cd plugins/ \ + cd plugins/; \ for PACKAGE_LINK in $DISCOURSE_ADDITIONAL_PLUGINS; do \ git clone "$PACKAGE_LINK"; \ done; \ bundle exec rake plugin:update plugin=discourse-plugin-checklist; \ bundle exec rake assets:clean; \ - bundle exec rake assets:precompile; \ fi EXPOSE 3000 -- GitLab From 7e733400a58c654cd84aa10066734a3840195fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Mon, 5 Dec 2016 15:17:00 +0100 Subject: [PATCH 3/5] bugfix --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bbc49fe..101e071 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,8 +58,6 @@ RUN if [ "$DISCOURSE_ADDITIONAL_PLUGINS" != "" ]; then \ for PACKAGE_LINK in $DISCOURSE_ADDITIONAL_PLUGINS; do \ git clone "$PACKAGE_LINK"; \ done; \ - bundle exec rake plugin:update plugin=discourse-plugin-checklist; \ - bundle exec rake assets:clean; \ fi EXPOSE 3000 -- GitLab From 0f9ffb266e7a33722a8c9e770f6276a2780024c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Mon, 5 Dec 2016 23:58:48 +0100 Subject: [PATCH 4/5] DISCOURSE_ADDITIONAL_PLUGINS description in Readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index abeeed2..983e9c1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # docker-discourse + discourse image for discourse service + +## Discourse plugins + +This image supports installing Discourse plugins at build time, via the `DISCOURSE_ADDITIONAL_PLUGINS` [build arg](https://docs.docker.com/engine/reference/builder/#/arg). Set it to a whitespace (space, tab, newline) separated list if valid `git` URLs of plugins to be installed at build time. \ No newline at end of file -- GitLab From 247f1820d16e193691690c34ad2d491b8c66c190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=27rysiek=27=20Wo=C5=BAniak?= Date: Tue, 6 Dec 2016 10:24:48 +0100 Subject: [PATCH 5/5] whitespace fixes --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 101e071..d7a6648 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ ENV DISCOURSE_VERSION=1.7.0.beta3 \ DISCOURSE_SERVE_STATIC_ASSETS=true \ GIFSICLE_VERSION=1.87 \ PNGQUANT_VERSION=2.4.1 - + RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - \ && apt-get update && apt-get install -y --no-install-recommends \ autoconf \ @@ -46,7 +46,7 @@ RUN git clone --branch v${DISCOURSE_VERSION} https://github.com/discourse/discou && git remote set-branches --add origin tests-passed \ && bundle config build.nokogiri --use-system-libraries \ && bundle install --deployment --without test --without development - + # install discourse plugins # assumptions: no spaces in URLs (urlencoding is a thing) -- GitLab