Remove dedicated Theia user from theia-spring-boot image

This commit is contained in:
Kris De Volder
2019-07-29 11:59:49 -07:00
parent 4d7f9b127c
commit 014c69ac15
3 changed files with 17 additions and 13 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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