diff --git a/theia-extensions/k8s-app/Dockerfile b/theia-extensions/k8s-app/Dockerfile index a39248dc8..da9bac814 100644 --- a/theia-extensions/k8s-app/Dockerfile +++ b/theia-extensions/k8s-app/Dockerfile @@ -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 diff --git a/theia-extensions/k8s-app/build-all-and-deploy-to-k8s.sh b/theia-extensions/k8s-app/build-all-and-deploy-to-k8s.sh index aec526382..5b1dac5a9 100755 --- a/theia-extensions/k8s-app/build-all-and-deploy-to-k8s.sh +++ b/theia-extensions/k8s-app/build-all-and-deploy-to-k8s.sh @@ -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 diff --git a/theia-extensions/k8s-app/deploy.yml b/theia-extensions/k8s-app/deploy.yml index c5b9412c3..e0dc90335 100644 --- a/theia-extensions/k8s-app/deploy.yml +++ b/theia-extensions/k8s-app/deploy.yml @@ -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