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

Rework images for remote plugins #485

Merged
merged 38 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4ba4ebf
Add remote binary image.
AndrienkoAleksandr Sep 27, 2019
4e0e945
Fix up.
AndrienkoAleksandr Sep 29, 2019
3eb12f0
Remove extending from remote-runtime image.
AndrienkoAleksandr Oct 1, 2019
319f2d3
Add remote node images: alpine and ubi
AndrienkoAleksandr Oct 7, 2019
d26243f
Rework clang.
AndrienkoAleksandr Oct 7, 2019
ce6f8d8
Rework clang image.
AndrienkoAleksandr Oct 7, 2019
763d30f
Rework kubernetes and openshift plugins images
evidolob Oct 8, 2019
2c1795b
Update python, go, php, analytica images.
AndrienkoAleksandr Oct 8, 2019
f1b5874
Merge branch 'master' of github.com:eclipse/che-theia into reworkImages
AndrienkoAleksandr Oct 8, 2019
b330647
Use node for some debuggers.
AndrienkoAleksandr Oct 8, 2019
3165065
Fix up.
AndrienkoAleksandr Oct 8, 2019
cf00466
Merge branch 'master' of github.com:eclipse/che-theia into reworkImages
AndrienkoAleksandr Oct 9, 2019
882a404
Rewrite openshift-connector-0.1.0 docker file
evidolob Oct 9, 2019
fb2997c
Merge branch 'reworkImages' of github.com:eclipse/che-theia into rewo…
AndrienkoAleksandr Oct 9, 2019
e379ffd
Rework remote-plugin-dependency-analytics-0.0.13 image
AndrienkoAleksandr Oct 9, 2019
9cc92eb
Add UBI based images for k8s and openshift plugins
evidolob Oct 9, 2019
bed4965
add docker file for java8 based on openjdk-8-rhel8
evidolob Oct 10, 2019
5aa794f
Add image for java 11 plugin, based on 'openjdk-11-rhel8'
evidolob Oct 10, 2019
809858e
Add ubi based images for plython plugins
evidolob Oct 11, 2019
abc51e2
Merge branch 'master' of github.com:eclipse/che-theia into reworkImages
evidolob Oct 15, 2019
30e9882
Rename 'Dockerfile.rhel(ubi)' to 'rhel.Dockerfile'
evidolob Oct 15, 2019
e38d01b
Add php 7.2 ubi Dockerfile
AndrienkoAleksandr Oct 18, 2019
b2c8539
Add Analytics remote plugin docker image based on ubi8
mmorhun Oct 22, 2019
93873da
Remove not needed java rhell Docker files.
AndrienkoAleksandr Oct 22, 2019
34a12f8
Remove rhell kubernetes tooling Dockerfile 0.1.17
AndrienkoAleksandr Oct 22, 2019
03eef3e
Merge branch 'master' of github.com:eclipse/che-theia into reworkImages
AndrienkoAleksandr Oct 22, 2019
094d2ea
Remove rhel dockerfiel remote-plugin-kubernetes-tooling-1.0.0
AndrienkoAleksandr Oct 22, 2019
37644b3
Remove remote-plugin-node rhel Dockerfile.
AndrienkoAleksandr Oct 22, 2019
3ba64d6
Remove python rhel Dockerfile.
AndrienkoAleksandr Oct 22, 2019
78760ca
Remove openshift connector rhel dockerfiles.
AndrienkoAleksandr Oct 22, 2019
e2fc77f
Remove python 3.7.3 and php rhel dockerfiles
AndrienkoAleksandr Oct 22, 2019
7cd05e9
Rework kubernetes 1.0.4 image.
AndrienkoAleksandr Oct 22, 2019
70d3d4d
Add entrypoint scripts for all sidecar images.
AndrienkoAleksandr Oct 24, 2019
4c1a529
Rename user from theia to simple user.
AndrienkoAleksandr Oct 24, 2019
b4e6aaf
Fix up.
AndrienkoAleksandr Oct 24, 2019
27611c1
Merge branch 'master' of github.com:eclipse/che-theia into reworkImages
AndrienkoAleksandr Oct 24, 2019
a398c83
Fix up.
AndrienkoAleksandr Oct 25, 2019
530d838
Fix losed CMD.
AndrienkoAleksandr Oct 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.include
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ DOCKER_FILES_LOCATIONS=(
dockerfiles/theia
dockerfiles/theia-endpoint-runtime
dockerfiles/theia-endpoint-runtime-binary
dockerfiles/remote-plugin-node
dockerfiles/remote-plugin-java8
dockerfiles/remote-plugin-java11
dockerfiles/remote-plugin-php7
Expand All @@ -91,6 +92,7 @@ PUBLISH_IMAGES_LIST=(
eclipse/che-theia
eclipse/che-theia-endpoint-runtime
eclipse/che-theia-endpoint-runtime-binary
eclipse/remote-plugin-node
eclipse/che-remote-plugin-runner-java8
eclipse/che-remote-plugin-runner-java11
eclipse/che-remote-plugin-php7
Expand Down
18 changes: 9 additions & 9 deletions dockerfiles/remote-plugin-clang-8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia-endpoint-runtime:${BUILD_TAG} as endpoint

FROM debian:10-slim

ENV HOME=/home/theia
Expand All @@ -27,12 +25,14 @@ RUN apt-get update && \
update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-8 100 && \
update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-8 100

COPY --from=endpoint /home/theia /home/theia
COPY --from=endpoint /projects /projects
COPY --from=endpoint /etc/passwd /etc/passwd
COPY --from=endpoint /etc/group /etc/group
COPY --from=endpoint /entrypoint.sh /entrypoint.sh
RUN mkdir /projects ${HOME} && \
# Change permissions to let any arbitrary user
for f in "${HOME}" "/etc/passwd" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

RUN chmod -R 777 ${HOME}
ADD etc/entrypoint.sh /entrypoint.sh

ENTRYPOINT ["bash", "/entrypoint.sh"]
ENTRYPOINT [ "/entrypoint.sh" ]
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
28 changes: 28 additions & 0 deletions dockerfiles/remote-plugin-clang-8/etc/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
# Copyright (c) 2018-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

set -e

export USER_ID=$(id -u)
export GROUP_ID=$(id -g)

if ! whoami >/dev/null 2>&1; then
echo "${USER_NAME:-user}:x:${USER_ID}:0:${USER_NAME:-user} user:${HOME}:/bin/sh" >> /etc/passwd
fi

# Grant access to projects volume in case of non root user with sudo rights
if [ "${USER_ID}" -ne 0 ] && command -v sudo >/dev/null 2>&1 && sudo -n true > /dev/null 2>&1; then
sudo chown "${USER_ID}:${GROUP_ID}" /projects
fi

exec "$@"
15 changes: 14 additions & 1 deletion dockerfiles/remote-plugin-dependency-analytics-0.0.12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,30 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia-endpoint-runtime:${BUILD_TAG}
FROM node:10.16-alpine
RUN apk --update --no-cache add openjdk8 procps nss maven
ENV JAVA_HOME /usr/lib/jvm/default-jvm/

ENV MAVEN_VERSION 3.5.4
ENV MAVEN_HOME /usr/lib/mvn
ENV PATH $MAVEN_HOME/bin:$PATH
ENV HOME=/home/theia

RUN mkdir /projects ${HOME} && \
# Change permissions to let any arbitrary user
for f in "${HOME}" "/etc/passwd" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

RUN wget http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \
tar -zxvf apache-maven-$MAVEN_VERSION-bin.tar.gz && \
rm apache-maven-$MAVEN_VERSION-bin.tar.gz && \
mv apache-maven-$MAVEN_VERSION /usr/lib/mvn

WORKDIR /projects

ADD etc/entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
# Copyright (c) 2018-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

set -e

export USER_ID=$(id -u)
export GROUP_ID=$(id -g)

if ! whoami >/dev/null 2>&1; then
echo "${USER_NAME:-user}:x:${USER_ID}:0:${USER_NAME:-user} user:${HOME}:/bin/sh" >> /etc/passwd
fi

# Grant access to projects volume in case of non root user with sudo rights
if [ "${USER_ID}" -ne 0 ] && command -v sudo >/dev/null 2>&1 && sudo -n true > /dev/null 2>&1; then
sudo chown "${USER_ID}:${GROUP_ID}" /projects
fi

exec "$@"
15 changes: 14 additions & 1 deletion dockerfiles/remote-plugin-dependency-analytics-0.0.13/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia-endpoint-runtime:${BUILD_TAG}
FROM node:10.16-alpine
# npm comes from the base image, install maven and python3.
RUN apk --update --no-cache add openjdk8 procps nss maven python3 && [[ ! -e /usr/bin/python ]] && \
ln -sf /usr/bin/python3 /usr/bin/python
Expand All @@ -17,10 +17,23 @@ ENV JAVA_HOME /usr/lib/jvm/default-jvm/
ENV MAVEN_VERSION 3.5.4
ENV MAVEN_HOME /usr/lib/mvn
ENV PATH $MAVEN_HOME/bin:$PATH
ENV HOME=/home/theia

RUN mkdir /projects ${HOME} && \
# Change permissions to let any arbitrary user
for f in "${HOME}" "/etc/passwd" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

RUN wget http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz && \
tar -zxvf apache-maven-$MAVEN_VERSION-bin.tar.gz && \
rm apache-maven-$MAVEN_VERSION-bin.tar.gz && \
mv apache-maven-$MAVEN_VERSION /usr/lib/mvn

WORKDIR /projects

ADD etc/entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
# Copyright (c) 2018-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

set -e

export USER_ID=$(id -u)
export GROUP_ID=$(id -g)

if ! whoami >/dev/null 2>&1; then
echo "${USER_NAME:-user}:x:${USER_ID}:0:${USER_NAME:-user} user:${HOME}:/bin/sh" >> /etc/passwd
fi

# Grant access to projects volume in case of non root user with sudo rights
if [ "${USER_ID}" -ne 0 ] && command -v sudo >/dev/null 2>&1 && sudo -n true > /dev/null 2>&1; then
sudo chown "${USER_ID}:${GROUP_ID}" /projects
fi

exec "$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2019 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM registry.access.redhat.com/ubi8/ubi

RUN dnf install -y \
python3 nodejs java-1.8.0-openjdk maven \
procps-ng nss \
&& dnf clean all \
&& if [[ ! -e "/usr/bin/python" ]] ; then ln -sf /usr/bin/python3 /usr/bin/python; fi

ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.el8_0.x86_64/bin/
ENV MAVEN_HOME /usr/share/maven/bin/

ENV HOME /home/theia

RUN mkdir ${HOME} /projects \
# Change permissions to let any arbitrary user
&& for f in "${HOME}" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

WORKDIR /projects
31 changes: 14 additions & 17 deletions dockerfiles/remote-plugin-dotnet-2.2.105/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia-endpoint-runtime:${BUILD_TAG} as endpoint
FROM node:10.16-stretch-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -50,25 +49,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libssl1.0.2 \
libstdc++6 \
zlib1g \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists/*

# Install typescript@2.9.2 and node-gyp

&& yarn global add typescript@2.9.2 node-gyp \
&& node-gyp install
# Install .NET Core SDK
ENV DOTNET_SDK_VERSION 2.2.105

ENV HOME=/home/theia
COPY --from=endpoint /home/theia /home/theia
COPY --from=endpoint /projects /projects
COPY --from=endpoint /etc/passwd /etc/passwd
COPY --from=endpoint /etc/group /etc/group
COPY --from=endpoint /entrypoint.sh /entrypoint.sh

RUN find /home/theia/ -name "binding.gyp" | xargs -i sh -c 'cd $(dirname {}) && node-gyp rebuild' \
&& sed -i 's/SIGHUP SIGTERM SIGINT/HUP TERM INT/g' /entrypoint.sh

# Install .NET Core SDK
ENV DOTNET_SDK_VERSION 2.2.105
RUN mkdir /projects ${HOME} && \
# Change permissions to let any arbitrary user
for f in "${HOME}" "/etc/passwd" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-x64.tar.gz \
&& dotnet_sha512='b7ad26b344995de91848adec56bda5dfe5fef0b83abaa3e4376dc790cf9786e945b625de1ae4cecaf5c5bef86284652886ed87696581553aeda89ee2e2e99517' \
Expand All @@ -94,4 +87,8 @@ ENV ASPNETCORE_URLS=http://+:80 \

# Trigger first run experience by running arbitrary cmd to populate local package cache
RUN dotnet help
ENTRYPOINT ["/entrypoint.sh"]

ADD etc/entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
28 changes: 28 additions & 0 deletions dockerfiles/remote-plugin-dotnet-2.2.105/etc/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
# Copyright (c) 2018-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

set -e

export USER_ID=$(id -u)
export GROUP_ID=$(id -g)

if ! whoami >/dev/null 2>&1; then
echo "${USER_NAME:-user}:x:${USER_ID}:0:${USER_NAME:-user} user:${HOME}:/bin/sh" >> /etc/passwd
fi

# Grant access to projects volume in case of non root user with sudo rights
if [ "${USER_ID}" -ne 0 ] && command -v sudo >/dev/null 2>&1 && sudo -n true > /dev/null 2>&1; then
sudo chown "${USER_ID}:${GROUP_ID}" /projects
fi

exec "$@"
16 changes: 15 additions & 1 deletion dockerfiles/remote-plugin-go-1.10.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia-endpoint-runtime:${BUILD_TAG}
FROM node:10.16-alpine

ENV HOME=/home/theia

RUN mkdir /projects ${HOME} && \
# Change permissions to let any arbitrary user
for f in "${HOME}" "/etc/passwd" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

RUN set -eux; \
apk add --update --no-cache --virtual .build-deps \
Expand Down Expand Up @@ -77,3 +86,8 @@ ENV GOPATH /go
ENV GOCACHE /.cache
ENV GOROOT /usr/local/go
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH

ADD etc/entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
28 changes: 28 additions & 0 deletions dockerfiles/remote-plugin-go-1.10.7/etc/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
# Copyright (c) 2018-2018 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Red Hat, Inc. - initial API and implementation
#

set -e

export USER_ID=$(id -u)
export GROUP_ID=$(id -g)

if ! whoami >/dev/null 2>&1; then
echo "${USER_NAME:-user}:x:${USER_ID}:0:${USER_NAME:-user} user:${HOME}:/bin/sh" >> /etc/passwd
fi

# Grant access to projects volume in case of non root user with sudo rights
if [ "${USER_ID}" -ne 0 ] && command -v sudo >/dev/null 2>&1 && sudo -n true > /dev/null 2>&1; then
sudo chown "${USER_ID}:${GROUP_ID}" /projects
fi

exec "$@"
16 changes: 15 additions & 1 deletion dockerfiles/remote-plugin-go-1.12.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
# Contributors:
# Red Hat, Inc. - initial API and implementation

FROM ${BUILD_ORGANIZATION}/${BUILD_PREFIX}-theia-endpoint-runtime:${BUILD_TAG}
FROM node:10.16-alpine

ENV HOME=/home/theia

RUN mkdir /projects ${HOME} && \
# Change permissions to let any arbitrary user
for f in "${HOME}" "/etc/passwd" "/projects"; do \
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
chmod -R g+rwX ${f}; \
done

RUN set -e \
&& \
Expand Down Expand Up @@ -74,3 +83,8 @@ ENV GOCACHE /.cache
ENV GOROOT /usr/local/go
ENV GO111MODULE on
ENV PATH $GOPATH/bin:$GOROOT/bin:$PATH

ADD etc/entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
Loading