Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Build plugins from che-theia-dev builder image rather than getting it
Browse files Browse the repository at this point in the history
from released travis

Signed-off-by: Sun Seng David TAN <sutan@redhat.com>
  • Loading branch information
sunix committed Jan 31, 2019
1 parent 1a5cafe commit 935be69
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions dockerfiles/theia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ ARG GITHUB_TOKEN
# Define upstream version of theia to use
ARG THEIA_VERSION=0.3.18

# Define che-theia branch to use for plugins
ARG CHE_THEIA_PLUGIN_BRANCH=master

ENV NODE_OPTIONS="--max-old-space-size=4096"

# Check github limit
Expand Down Expand Up @@ -70,6 +73,13 @@ RUN che:theia production
# change permissions
RUN find production -exec sh -c "chgrp 0 {}; chmod g+rwX {}" \; 2>log.txt

# Clone and build che-theia plugins
RUN git clone --branch ${CHE_THEIA_PLUGIN_BRANCH} --single-branch --depth 1 https://github.com/eclipse/che-theia ${HOME}/che-theia-source-code
WORKDIR ${HOME}/che-theia-source-code/plugins/containers-plugins
RUN yarn
WORKDIR ${HOME}/che-theia-source-code/plugins/factory-plugin
RUN yarn

###
# Runtime Image
#
Expand Down Expand Up @@ -101,8 +111,6 @@ RUN adduser --disabled-password -S -u 1001 -G root -h ${HOME} -s /bin/sh theia \
&& mkdir /default-theia-plugins \
# Download yeoman generator plug-in
&& curl -L -o /default-theia-plugins/theia_yeoman_plugin.theia https://github.com/eclipse/theia-yeoman-plugin/releases/download/untagged-04f28ee329e479cc465b/theia_yeoman_plugin.theia \
&& curl -L -o /default-theia-plugins/eclipse_che_theia_factory_plugin.theia https://github.com/eclipse/che-theia/releases/download/0.0.1/eclipse_che_theia_factory_plugin.theia \
&& curl -L -o /default-theia-plugins/eclipse_che_theia_containers_plugin.theia https://github.com/eclipse/che-theia/releases/download/0.0.1/eclipse_che_theia_containers_plugin.theia \
&& for f in "${HOME}" "/etc/passwd" "/etc/group /node_modules /default-theia-plugins /projects"; do\
sudo chgrp -R 0 ${f} && \
sudo chmod -R g+rwX ${f}; \
Expand All @@ -127,6 +135,10 @@ RUN adduser --disabled-password -S -u 1001 -G root -h ${HOME} -s /bin/sh theia \
&& find ${HOME} -exec sh -c "chgrp 0 {}; chmod g+rwX {}" \;

COPY --chown=theia:root --from=builder /home/theia-dev/theia-source-code/production /home/theia

COPY --chown=theia:root --from=builder /home/theia-dev/che-theia-source-code/plugins/factory-plugin/eclipse_che_theia_factory_plugin.theia /default-theia-plugins/eclipse_che_theia_factory_plugin.theia
COPY --chown=theia:root --from=builder /home/theia-dev/che-theia-source-code/plugins/containers-plugin/eclipse_che_theia_containers_plugin.theia /default-theia-plugins/eclipse_che_theia_containers_plugin.theia

USER theia
WORKDIR /projects
ADD src/entrypoint.sh /entrypoint.sh
Expand Down

0 comments on commit 935be69

Please sign in to comment.