-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contribute remaining sidecar definitions to the plugin registry (#681)
* Contribute remaining sidecar definitions to the plugin registry README/CONTRIBUTING update will follow in a separate PR. Part of eclipse-che/che#18217 Signed-off-by: Eric Williams <ericwill@redhat.com> * Split PR into smaller pieces for ease of build time Signed-off-by: Eric Williams <ericwill@redhat.com>
- Loading branch information
Showing
21 changed files
with
298 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Copyright (c) 2020 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 quay.io/eclipse/che-sidecar-kubernetes-tooling:1.2.1-6144144 | ||
|
||
ENV KAMEL_VERSION 1.2.0 | ||
|
||
RUN curl -L https://github.com/apache/camel-k/releases/download/v${KAMEL_VERSION}/camel-k-client-${KAMEL_VERSION}-linux-64bit.tar.gz | tar -C /usr/local/bin -xz \ | ||
&& chmod +x /usr/local/bin/kamel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
linux/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright (c) 2020 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 quay.io/eclipse/che-container-tools:1.0.0-8caea0f | ||
|
||
ENV MINIKUBE_VERSION=v1.12.1 | ||
|
||
ADD etc/storage.conf ${HOME}/.config/containers/storage.conf | ||
ADD etc/containers.conf ${HOME}/.config/containers/containers.conf | ||
ADD etc/subuid /etc/subuid | ||
ADD etc/subgid /etc/subgid | ||
|
||
RUN export ARCH_MINIKUBE="$(uname -m)" && if [[ ${ARCH_MINIKUBE} == "x86_64" ]]; then export ARCH_MINIKUBE="amd64"; elif [[ ${ARCH_MINIKUBE} == "aarch64" ]]; \ | ||
then export ARCH_MINIKUBE="arm64"; fi && \ | ||
curl https://storage.googleapis.com/minikube/releases/${MINIKUBE_VERSION}/minikube-linux-${ARCH_MINIKUBE} -o /usr/local/bin/minikube && \ | ||
chmod +x /usr/local/bin/minikube && \ | ||
# buildah login requires writing to /run | ||
chgrp -R 0 /run && chmod -R g+rwX /run && \ | ||
mkdir -p /var/tmp/containers/runtime && \ | ||
chmod -R g+rwX /var/tmp/containers | ||
|
||
ENV XDG_RUNTIME_DIR /var/tmp/containers/runtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
linux/amd64,linux/ppc64le,linux/s390x,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[engine] | ||
|
||
# Cgroup management implementation used for the runtime. | ||
# Valid options “systemd” or “cgroupfs” | ||
# | ||
cgroup_manager = "cgroupfs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[storage] | ||
|
||
# Default Storage Driver | ||
driver = "vfs" | ||
|
||
# Temporary storage location | ||
runroot = "/var/tmp/containers/storage" | ||
|
||
# Primary Read/Write location of container storage | ||
graphroot = "/home/theia/.containers/storage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
user:100000:65536 | ||
root:200000:65536 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
user:100000:65536 | ||
root:200000:65536 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright (c) 2020 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 quay.io/eclipse/che-container-tools:1.0.0-8caea0f | ||
|
||
# odo and oc versions have to match the ones defined in https://github.com/redhat-developer/vscode-openshift-tools/blob/master/src/tools.json | ||
ENV ODO_VERSION=v2.0.0 \ | ||
OC_VERSION=4.3.3 | ||
|
||
RUN curl -o- -L https://mirror.openshift.com/pub/openshift-v4/clients/ocp/${OC_VERSION}/openshift-client-linux-${OC_VERSION}.tar.gz | tar xvz -C /usr/local/bin oc && \ | ||
chmod +x /usr/local/bin/oc && \ | ||
#Set the arch | ||
export ARCH="$(uname -m)" && if [[ ${ARCH} == "x86_64" ]]; then export ARCH="amd64"; fi && \ | ||
# install odo | ||
curl -o /usr/local/bin/odo https://mirror.openshift.com/pub/openshift-v4/clients/odo/${ODO_VERSION}/odo-linux-${ARCH} && \ | ||
chmod +x /usr/local/bin/odo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
linux/amd64,linux/ppc64le,linux/s390x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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 debian:10-slim | ||
|
||
ENV HOME=/home/theia | ||
ENV PROTOC_VERSION=3.11.2 | ||
|
||
RUN echo "deb http://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list && \ | ||
apt-get update && \ | ||
apt-get install wget gnupg unzip -y && \ | ||
apt-get update && \ | ||
apt-get install -t buster-backports clangd-8 clang-8 clang-format-8 gdb -y && \ | ||
apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/* && \ | ||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-8 100 && \ | ||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-8 100 && \ | ||
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 | ||
|
||
RUN cd /tmp && mkdir protoc-download && cd protoc-download && \ | ||
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ | ||
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && rm -f protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ | ||
cp bin/protoc /usr/local/bin && mkdir /usr/include/protobuf && \ | ||
cp -R include/* /usr/include/protobuf/ && cd ../ && rm -rf protoc-download | ||
|
||
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 | ||
|
||
ADD etc/entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
linux/amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2018-2020 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 | ||
set -x | ||
|
||
USER_ID=$(id -u) | ||
export USER_ID | ||
GROUP_ID=$(id -g) | ||
export GROUP_ID | ||
|
||
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 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# 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 python:3.8.6-slim | ||
|
||
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 apt-get update && \ | ||
apt-get install exuberant-ctags && \ | ||
apt-get install wget -y && \ | ||
wget -O - https://deb.nodesource.com/setup_12.x | bash - && \ | ||
apt-get update && \ | ||
apt-get install nodejs gcc build-essential -y && \ | ||
pip install pylint python-language-server[all] ptvsd jedi && \ | ||
apt-get purge -y --auto-remove gcc build-essential && \ | ||
apt-get clean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/* | ||
|
||
ADD etc/entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
linux/amd64,linux/ppc64le,linux/s390x,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2018-2020 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 | ||
set -x | ||
|
||
USER_ID=$(id -u) | ||
export USER_ID | ||
GROUP_ID=$(id -g) | ||
export GROUP_ID | ||
|
||
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 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) 2020 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 koalaman/shellcheck-alpine:v0.7.1 | ||
|
||
RUN mkdir /projects && \ | ||
# Change permissions to let any arbitrary user | ||
for f in "/etc/passwd" "/projects"; do \ | ||
echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \ | ||
chmod -R g+rwX ${f}; \ | ||
done | ||
|
||
ADD etc/entrypoint.sh /entrypoint.sh | ||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
linux/amd64,linux/arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2018-2020 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 | ||
set -x | ||
|
||
USER_ID=$(id -u) | ||
export USER_ID | ||
GROUP_ID=$(id -g) | ||
export GROUP_ID | ||
|
||
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 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# 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 quay.io/eclipse/che-sidecar-java:11-7bd8c8c | ||
RUN apk add --no-cache nodejs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
linux/amd64,linux/ppc64le,linux/s390x,linux/arm64 |