File tree Expand file tree Collapse file tree 5 files changed +130
-0
lines changed Expand file tree Collapse file tree 5 files changed +130
-0
lines changed Original file line number Diff line number Diff line change @@ -376,6 +376,27 @@ plugins:
376
376
https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-java-debug/vscode-java-debug-0.26.0.vsix
377
377
- >-
378
378
https://open-vsx.org/api/vscjava/vscode-java-test/0.24.0/file/vscjava.vscode-java-test-0.24.0.vsix
379
+ - id : redhat/java21
380
+ repository :
381
+ url : ' https://github.com/redhat-developer/vscode-java'
382
+ revision : v1.0.0
383
+ featured : true
384
+ sidecar :
385
+ image : ' docker.io/hackajobchallenges/che-sidecar-java:21'
386
+ name : vscode-java
387
+ memoryLimit : 1500Mi
388
+ cpuLimit : 500m
389
+ cpuRequest : 30m
390
+ volumeMounts :
391
+ - name : m2
392
+ path : /home/theia/.m2
393
+ extensions :
394
+ - >-
395
+ https://download.jboss.org/jbosstools/static/jdt.ls/stable/java-0.63.0-2222.vsix
396
+ - >-
397
+ https://download.jboss.org/jbosstools/vscode/3rdparty/vscode-java-debug/vscode-java-debug-0.26.0.vsix
398
+ - >-
399
+ https://open-vsx.org/api/vscjava/vscode-java-test/0.24.0/file/vscjava.vscode-java-test-0.24.0.vsix
379
400
- id : redhat/java8
380
401
repository :
381
402
url : ' https://github.com/redhat-developer/vscode-java'
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2018 Red Hat, Inc.
2
+ # This program and the accompanying materials are made
3
+ # available under the terms of the Eclipse Public License 2.0
4
+ # which is available at https://www.eclipse.org/legal/epl-2.0/
5
+ #
6
+ # SPDX-License-Identifier: EPL-2.0
7
+ #
8
+ # Contributors:
9
+ # Red Hat, Inc. - initial API and implementation
10
+
11
+ FROM eclipse-temurin:21-alpine
12
+
13
+ ENV HOME=/home/theia
14
+
15
+ RUN mkdir /projects ${HOME} && \
16
+ # Change permissions to let any arbitrary user
17
+ for f in "${HOME}" "/etc/passwd" "/projects" ; do \
18
+ echo "Changing permissions on ${f}" && chgrp -R 0 ${f} && \
19
+ chmod -R g+rwX ${f}; \
20
+ done
21
+
22
+ RUN apk --update --no-cache add procps nss
23
+ ADD etc/before-start.sh /before-start.sh
24
+
25
+ ADD etc/entrypoint.sh /entrypoint.sh
26
+
27
+ WORKDIR /projects
28
+
29
+ ENTRYPOINT ["/entrypoint.sh" ]
30
+ CMD ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
Original file line number Diff line number Diff line change
1
+ linux/amd64,linux/ppc64le,linux/s390x,linux/arm64
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Copyright (c) 2020 Red Hat, Inc.
4
+ # This program and the accompanying materials are made
5
+ # available under the terms of the Eclipse Public License 2.0
6
+ # which is available at https://www.eclipse.org/legal/epl-2.0/
7
+ #
8
+ # SPDX-License-Identifier: EPL-2.0
9
+ #
10
+ # Contributors:
11
+ # Red Hat, Inc. - initial API and implementation
12
+ #
13
+
14
+ m2=" $HOME /.m2"
15
+ settingsXML=" $m2 /settings.xml"
16
+
17
+ set_maven_mirror () {
18
+ [ ! -d " $m2 " ] && mkdir -p " $m2 "
19
+
20
+ if [ ! -f " $settingsXML " ]; then
21
+ {
22
+ echo " <settings xmlns=\" http://maven.apache.org/SETTINGS/1.0.0\" "
23
+ echo " xmlns:xsi=\" http://www.w3.org/2001/XMLSchema-instance\" "
24
+ echo " xsi:schemaLocation=\" http://maven.apache.org/SETTINGS/1.0.0"
25
+ echo " https://maven.apache.org/xsd/settings-1.0.0.xsd\" >"
26
+ echo " <mirrors>"
27
+ echo " <mirror>"
28
+ echo " <url>\$ {env.MAVEN_MIRROR_URL}</url>"
29
+ echo " <mirrorOf>external:*</mirrorOf>"
30
+ echo " </mirror>"
31
+ echo " </mirrors>"
32
+ echo " </settings>"
33
+ } >> " $settingsXML "
34
+ else
35
+ if ! grep -q " <url>\$ {env.MAVEN_MIRROR_URL}</url>" " $settingsXML " ; then
36
+ if grep -q " <mirrors>" " $settingsXML " ; then
37
+ # shellcheck disable=SC2154
38
+ sed -i " s/<mirrors>/<mirrors>\n <mirror>\n <url>${env.MAVEN_MIRROR_URL} <\/url>\n <mirrorOf>external:\*<\/mirrorOf>\n <\/mirror>/" " $settingsXML "
39
+ else
40
+ # shellcheck disable=SC2154
41
+ sed -i " s/<\/settings>/ <mirrors>\n <mirror>\n <url>${env.MAVEN_MIRROR_URL} <\/url>\n <mirrorOf>external:*<\/mirrorOf>\n <\/mirror>\n <\/mirrors>\n<\/settings>/" " $settingsXML "
42
+ fi
43
+ fi
44
+ fi
45
+ }
46
+
47
+ [ -n " $MAVEN_MIRROR_URL " ] && set_maven_mirror
48
+ return 0
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+ #
3
+ # Copyright (c) 2018-2020 Red Hat, Inc.
4
+ # This program and the accompanying materials are made
5
+ # available under the terms of the Eclipse Public License 2.0
6
+ # which is available at https://www.eclipse.org/legal/epl-2.0/
7
+ #
8
+ # SPDX-License-Identifier: EPL-2.0
9
+ #
10
+ # Contributors:
11
+ # Red Hat, Inc. - initial API and implementation
12
+ #
13
+
14
+ set -e
15
+
16
+ USER_ID=$( id -u)
17
+ GROUP_ID=$( id -g)
18
+ export USER_ID
19
+ export GROUP_ID
20
+
21
+ if ! whoami > /dev/null 2>&1 ; then
22
+ echo " ${USER_NAME:- user} :x:${USER_ID} :0:${USER_NAME:- user} user:${HOME} :/bin/sh" >> /etc/passwd
23
+ fi
24
+
25
+ # Grant access to projects volume in case of non root user with sudo rights
26
+ if [ " ${USER_ID} " -ne 0 ] && command -v sudo > /dev/null 2>&1 && sudo -n true > /dev/null 2>&1 ; then
27
+ sudo chown " ${USER_ID} :${GROUP_ID} " /projects
28
+ fi
29
+
30
+ exec " $@ "
You can’t perform that action at this time.
0 commit comments