File tree 3 files changed +22
-32
lines changed
3 files changed +22
-32
lines changed Original file line number Diff line number Diff line change 30
30
31
31
source kubedock_setup
32
32
33
+ # Stow
34
+ # # Required for https://github.com/eclipse/che/issues/22412
35
+
36
+ # /home/user/ will be mounted to by a PVC if persistUserHome is enabled
37
+ mountpoint -q /home/user/; HOME_USER_MOUNTED=$?
38
+
39
+ # This file will be created after stowing, to guard from executing stow everytime the container is started
40
+ STOW_COMPLETE=/home/user/.stow_completed
41
+
42
+ if [ $HOME_USER_MOUNTED -eq 0 ] && [ ! -f $STOW_COMPLETE ]; then
43
+ # Create symbolic links from /home/tooling/ -> /home/user/
44
+ stow . -t /home/user/ -d /home/tooling/ --no-folding -v 2 > /tmp/stow.log 2>&1
45
+ # Vim does not permit .viminfo to be a symbolic link for security reasons, so manually copy it
46
+ cp /home/tooling/.viminfo /home/user/.viminfo
47
+ # We have to restore bash-related files back onto /home/user/ (since they will have been overwritten by the PVC)
48
+ # but we don't want them to be symbolic links (so that they persist on the PVC)
49
+ cp /home/tooling/.bashrc /home/user/.bashrc
50
+ cp /home/tooling/.bash_profile /home/user/.bash_profile
51
+ touch $STOW_COMPLETE
52
+ fi
53
+
33
54
exec " $@ "
Original file line number Diff line number Diff line change 2
2
3
3
# updateBaseImages.sh can't operate on SHA-based tags as they're not date-based or semver-sequential, and therefore cannot be ordered
4
4
FROM quay.io/devfile/base-developer-image:ubi9-latest
5
+
5
6
LABEL maintainer="Red Hat, Inc."
6
7
7
8
LABEL com.redhat.component="devfile-universal-container"
@@ -413,18 +414,12 @@ EOF
413
414
RUN echo 'export SDKMAN_DIR="/home/tooling/.sdkman"' >> ${PROFILE_EXT}
414
415
RUN echo '[[ -s "$SDKMAN_DIR/bin/sdkman-init.sh" ]] && source "$SDKMAN_DIR/bin/sdkman-init.sh"' >> ${PROFILE_EXT}
415
416
416
-
417
- # Create symbolic links from /home/tooling/ -> /home/user/
418
- RUN stow . -t /home/user/ -d /home/tooling/ --no-folding
419
-
420
417
# Set permissions on /etc/passwd, /etc/group, /etc/pki and /home to allow arbitrary users to write
421
418
RUN chgrp -R 0 /home && chmod -R g=u /etc/passwd /etc/group /home /etc/pki
422
419
423
420
# cleanup dnf cache
424
421
RUN dnf -y clean all --enablerepo='*'
425
422
426
- COPY --chown=0:0 entrypoint.sh /
427
-
428
423
USER 10001
429
424
430
425
ENV HOME=/home/user
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments