mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
Docker should not clone this repository on build
Fix Docker configuration to clone the project on run, and only if the host volume is not first mounted. This should help to conserve disk space.
This commit is contained in:
parent
133b1b5c77
commit
bd39008a6e
@ -16,18 +16,17 @@ RUN \
|
||||
RUN \
|
||||
gem install bundler
|
||||
|
||||
RUN \
|
||||
git clone --depth 1 https://github.com/jetbrains/intellij-sdk-docs.git /intellij-sdk-docs && \
|
||||
cd intellij-sdk-docs && \
|
||||
git submodule init && \
|
||||
git submodule update
|
||||
VOLUME /data
|
||||
|
||||
RUN cd intellij-sdk-docs && rake bootstrap
|
||||
|
||||
VOLUME /intellij-sdk-docs
|
||||
|
||||
WORKDIR /intellij-sdk-docs
|
||||
WORKDIR /data
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
CMD rake preview
|
||||
CMD \
|
||||
if cd intellij-sdk-docs; \
|
||||
then git pull; \
|
||||
else git clone --depth 1 https://github.com/jetbrains/intellij-sdk-docs.git && cd intellij-sdk-docs; \
|
||||
fi && \
|
||||
git submodule update --init && \
|
||||
rake bootstrap && \
|
||||
rake preview
|
||||
|
Loading…
x
Reference in New Issue
Block a user