Skip to content

Commit aed8fc4

Browse files
committed
Hopefully fix ssh within docker: 3rd try.
1 parent cee8634 commit aed8fc4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ RUN useradd -m -s /bin/bash cs61-user && \
8888
echo "cs61-user ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/cs61-init
8989

9090
# create binary reporting version of dockerfile
91-
RUN (echo '#\!/bin/sh'; echo 'echo 15') > /usr/bin/cs61-docker-version; chmod ugo+rx,u+w,go-w /usr/bin/cs61-docker-version
91+
RUN (echo '#\!/bin/sh'; echo 'echo 16') > /usr/bin/cs61-docker-version; chmod ugo+rx,u+w,go-w /usr/bin/cs61-docker-version
9292

9393
# git build arguments
9494
ARG USER=CS61\ User
@@ -105,7 +105,7 @@ RUN git config --global user.name "${USER}" && \
105105
echo "ls -al > /dev/null" >> ~/.bash_profile && \
106106
echo "for i in \`mount | grep /home/cs61-user | sed 's/^.*\\(\\/home[^ ]*\\).*/\\\\1/'\`; do ls -al \$i > /dev/null; done" >> ~/.bash_profile && \
107107
echo "# make ssh-auth.sock user-readable" >> ~/.bash_profile && \
108-
(echo "if test -f /run/host-services/ssh-auth.sock; then"; echo " sudo chown cs61-user:cs61-user /run/host-services/ssh-auth.sock"; echo "fi") >> ~/.bash_profile && \
108+
(echo "if test -e /run/host-services/ssh-auth.sock; then"; echo " sudo chown cs61-user:cs61-user /run/host-services/ssh-auth.sock"; echo "fi") >> ~/.bash_profile && \
109109
echo ". ~/.bashrc" >> ~/.bash_profile && \
110110
rm -f ~/.bash_logout && \
111111
echo "add-auto-load-safe-path ~" > ~/.gdbinit

docker/Dockerfile.arm64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ RUN useradd -m -s /bin/bash cs61-user && \
120120
echo "cs61-user ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/cs61-init
121121

122122
# create binary reporting version of dockerfile
123-
RUN (echo '#\!/bin/sh'; echo 'if test "x$1" = x-n; then echo 15; else echo 15.arm64; fi') > /usr/bin/cs61-docker-version; chmod ugo+rx,u+w,go-w /usr/bin/cs61-docker-version
123+
RUN (echo '#\!/bin/sh'; echo 'if test "x$1" = x-n; then echo 16; else echo 16.arm64; fi') > /usr/bin/cs61-docker-version; chmod ugo+rx,u+w,go-w /usr/bin/cs61-docker-version
124124

125125
# git build arguments
126126
ARG USER=CS61\ User
@@ -137,7 +137,7 @@ RUN git config --global user.name "${USER}" && \
137137
echo "ls -al > /dev/null" >> ~/.bash_profile && \
138138
echo "for i in \`mount | grep /home/cs61-user | sed 's/^.*\\(\\/home[^ ]*\\).*/\\\\1/'\`; do ls -al \$i > /dev/null; done" >> ~/.bash_profile && \
139139
echo "# make ssh-auth.sock user-readable" >> ~/.bash_profile && \
140-
(echo "if test -f /run/host-services/ssh-auth.sock; then"; echo " sudo chown cs61-user:cs61-user /run/host-services/ssh-auth.sock"; echo "fi") >> ~/.bash_profile && \
140+
(echo "if test -e /run/host-services/ssh-auth.sock; then"; echo " sudo chown cs61-user:cs61-user /run/host-services/ssh-auth.sock"; echo "fi") >> ~/.bash_profile && \
141141
echo ". ~/.bashrc" >> ~/.bash_profile && \
142142
echo "export PATH=/usr/x86_64-linux-gnu/bin:\$PATH" >> ~/.bashrc && \
143143
rm -f ~/.bash_logout && \

0 commit comments

Comments
 (0)