Skip to content

Commit

Permalink
mount required paths
Browse files Browse the repository at this point in the history
  • Loading branch information
xiam committed Oct 27, 2019
1 parent 87e6071 commit f77e994
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions upper-unsafebox/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@ mkdir -p $WORKDIR/c/etc

cp /app/playground $WORKDIR/c/bin

mount -o bind /usr/local/go $WORKDIR/c/usr/local/go
mount -o bind /go $WORKDIR/c/go
mount -o bind /dev $WORKDIR/c/dev
mount -o bind /lib $WORKDIR/c/lib
mount -o bind /lib64 $WORKDIR/c/lib64
echo "hosts: files dns" > $WORKDIR/c/etc/nsswitch.conf

mount -o ro,bind /usr/local/go $WORKDIR/c/usr/local/go
mount -o ro,bind /go $WORKDIR/c/go
mount -o ro,bind /dev $WORKDIR/c/dev
mount -o ro,bind /lib $WORKDIR/c/lib
mount -o ro,bind /lib64 $WORKDIR/c/lib64

touch $WORKDIR/c/etc/resolv.conf
mount -o ro,bind /etc/resolv.conf $WORKDIR/c/etc/resolv.conf

chmod -R 755 $WORKDIR/c/go
chmod -R 755 $WORKDIR/c/usr/local/go
Expand Down

0 comments on commit f77e994

Please sign in to comment.