This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add plantUML sidecar Signed-off-by: Esteban Mañaricua <emanaricua@gmail.com> * remove unused debs Signed-off-by: Esteban Mañaricua <emanaricua@gmail.com> * fix dates Signed-off-by: Esteban Mañaricua <emanaricua@gmail.com>
- Loading branch information
Showing
3 changed files
with
62 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,30 @@ | ||
# Copyright (c) 2021 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 plantuml/plantuml-server | ||
|
||
ENV TMPDIR=/tmp | ||
ENV HOME=/home/theia | ||
|
||
USER root | ||
|
||
RUN mkdir /projects && mkdir -p /home/theia && \ | ||
# 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 && \ | ||
chgrp -R 0 /run && chmod -R g+rwX /run && \ | ||
chgrp -R 0 /var/lib/jetty && chmod -R g+rwX /var/lib/jetty && \ | ||
apt update && apt install -y graphviz | ||
|
||
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-2021 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 "$@" |