Remove dedicated Theia user from theia-spring-boot image
This commit is contained in:
@@ -16,13 +16,14 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y yarn
|
||||
|
||||
RUN adduser --disabled-password --gecos '' theia
|
||||
RUN chmod g+rw /home && \
|
||||
mkdir -p /home/project && \
|
||||
chown -R theia:theia /home/theia && \
|
||||
chown -R theia:theia /home/project;
|
||||
RUN mkdir -p /home/project
|
||||
# RUN adduser --disabled-password --gecos '' theia
|
||||
# RUN chmod g+rw /home && \
|
||||
# mkdir -p /home/project && \
|
||||
# chown -R theia:theia /home/theia && \
|
||||
# chown -R theia:theia /home/project;
|
||||
WORKDIR /home/theia
|
||||
USER theia
|
||||
#USER theia
|
||||
|
||||
ADD package.json ./package.json
|
||||
RUN yarn --cache-folder ./ycache && rm -rf ./ycache
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
set -e
|
||||
|
||||
# Create k8s cluster using 'kind'
|
||||
kind create cluster
|
||||
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
|
||||
kubectl cluster-info
|
||||
#kind create cluster
|
||||
#export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
|
||||
#kubectl cluster-info
|
||||
|
||||
cd docker-boot-dev
|
||||
workdir=$(pwd)
|
||||
|
||||
#cd docker-boot-dev
|
||||
|
||||
# Build the 'theia-spring-boot' package
|
||||
./create-theia-boot-pkg.sh
|
||||
#./create-theia-boot-pkg.sh
|
||||
|
||||
# Then build it into a docker image
|
||||
docker build -t theia-spring-boot .
|
||||
@@ -17,7 +19,7 @@ docker build -t theia-spring-boot .
|
||||
# If using a 'kind' cluster, we must upload the image to the cluster
|
||||
kind load docker-image theia-spring-boot
|
||||
|
||||
cd ..
|
||||
cd ${workdir}
|
||||
|
||||
# Deploy to the cluster
|
||||
./deploy_theia_k8s.sh
|
||||
|
||||
@@ -35,7 +35,8 @@ spec:
|
||||
app: theia-spring-boot
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 3000
|
||||
runAsUser: 0
|
||||
# fsGroup: 1000
|
||||
containers:
|
||||
- name: theia-spring-boot
|
||||
image: theia-spring-boot
|
||||
|
||||
Reference in New Issue
Block a user