Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Update dockerfile patch and make new java devfiles used patched images #42

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion arbitrary-users-patch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ ARG FROM_IMAGE
FROM ${FROM_IMAGE}
USER 0
# Set permissions on /etc/passwd and /home to allow arbitrary users to write
RUN chmod g=u /etc/passwd /home
RUN mkdir -p /home/user
RUN chgrp -R 0 /home
RUN chmod -R g=u /etc/passwd /home
COPY [--chown=0:0] entrypoint.sh /
RUN chmod +x /entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion arbitrary-users-patch/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ ! -d "${HOME}" ]; then
fi

# Setup $PS1 for a consistent and reasonable prompt
if [ ! -f "${HOME}"/.bashrc ]; then
if [ -w "${HOME}" ] && [ ! -f "${HOME}"/.bashrc ]; then
echo "PS1='\s-\v \w \$ '" > "${HOME}"/.bashrc
fi

Expand Down
8 changes: 2 additions & 6 deletions devfiles/java-mysql/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ components:
-
type: dockerimage
alias: tools
image: registry.centos.org/che-stacks/centos-jdk8
command: ['sleep']
args: ['infinity']
image: quay.io/eclipse/che-java8-maven:nightly
env:
- name: JAVA_OPTS
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
Expand All @@ -26,8 +24,6 @@ components:
-Duser.home=/home/user"
- name: MAVEN_OPTS
value: $(JAVA_OPTS)
- name: PS1
value: $(echo ${0})\\$
memoryLimit: 700Mi
endpoints:
- name: '8080/tcp'
Expand Down Expand Up @@ -64,7 +60,7 @@ commands:
-
type: exec
component: tools
command: "./mvnw clean install"
command: "mvn clean install"
workdir: "${CHE_PROJECTS_ROOT}/web-java-spring-petclinic"
- name: run webapp
actions:
Expand Down
8 changes: 2 additions & 6 deletions devfiles/java-web-spring/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ components:
-
type: dockerimage
alias: tools
image: registry.centos.org/che-stacks/centos-jdk8
command: ['sleep']
args: ['infinity']
image: quay.io/eclipse/che-java8-maven:nightly
env:
- name: JAVA_OPTS
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
Expand All @@ -26,8 +24,6 @@ components:
-Duser.home=/home/user"
- name: MAVEN_OPTS
value: $(JAVA_OPTS)
- name: PS1
value: $(echo ${0})\\$
memoryLimit: 1024Mi
endpoints:
- name: '8080/tcp'
Expand All @@ -43,7 +39,7 @@ commands:
-
type: exec
component: tools
command: "./mvnw clean install"
command: "mvn clean install"
workdir: ${CHE_PROJECTS_ROOT}/java-web-spring
- name: run webapp
actions:
Expand Down
6 changes: 1 addition & 5 deletions devfiles/java-web-vertx/devfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ components:
-
type: dockerimage
alias: maven
image: registry.centos.org/che-stacks/centos-jdk8
command: ['sleep']
args: ['infinity']
image: quay.io/eclipse/che-java8-maven:nightly
env:
- name: JAVA_OPTS
value: "-XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10
Expand All @@ -26,8 +24,6 @@ components:
-Duser.home=/home/user"
- name: MAVEN_OPTS
value: $(JAVA_OPTS)
- name: PS1
value: $(echo ${0})\\$
memoryLimit: 512Mi
endpoints:
- name: '8080/tcp'
Expand Down