forked from che-dockerfiles/che-sidecar-kubernetes-tooling
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for version 1.0.9 of vscode-kubernetes-tools (che-dockerf…
…iles#4) This PR updates the Dockerfile to use helm 3, which is needed in order to upgrade to version 1.0.9 of vscode-kubernetes-tools. See eclipse-che/che#15190 Signed-off-by: Eric Williams <ericwill@redhat.com>
- Loading branch information
Showing
4 changed files
with
98 additions
and
2 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
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,36 @@ | ||
# 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/buildah/stable:v1.11.3 | ||
|
||
ENV KUBECTL_VERSION v1.17.0 | ||
ENV HELM_VERSION v3.0.2 | ||
ENV HOME=/home/theia | ||
|
||
ADD etc/storage.conf $HOME/.config/containers/storage.conf | ||
|
||
RUN mkdir /projects && \ | ||
# 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 && \ | ||
# buildah login requires writing to /run | ||
chgrp -R 0 /run && chmod -R g+rwX /run && \ | ||
curl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \ | ||
chmod +x /usr/local/bin/kubectl && \ | ||
curl -o- -L https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz | tar xvz -C /usr/local/bin --strip 1 && \ | ||
# 'which' utility is used by VS Code Kubernetes extension to find the binaries, e.g. 'kubectl' | ||
dnf install -y which nodejs | ||
|
||
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,29 @@ | ||
#!/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 "$@" | ||
|
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 @@ | ||
[storage] | ||
driver = "overlay" | ||
runroot = "/var/tmp/theia" | ||
graphroot = "/home/theia/.local/share/containers/storage" | ||
[storage.options] | ||
size = "" | ||
remap-uids = "" | ||
remap-gids = "" | ||
ignore_chown_errors = "true" | ||
remap-user = "" | ||
remap-group = "" | ||
ostree_repo = "" | ||
skip_mount_home = "" | ||
mount_program = "/usr/bin/fuse-overlayfs" | ||
mountopt = "" | ||
[storage.options.thinpool] | ||
autoextend_percent = "" | ||
autoextend_threshold = "" | ||
basesize = "" | ||
blocksize = "" | ||
directlvm_device = "" | ||
directlvm_device_force = "" | ||
fs = "" | ||
log_level = "" | ||
min_free_space = "" | ||
mkfsarg = "" | ||
mountopt = "" | ||
use_deferred_deletion = "" | ||
use_deferred_removal = "" | ||
xfs_nospace_max_retries = "" | ||
|