forked from vmware-archive/node-replicated-kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-entrypoint.sh
More file actions
37 lines (28 loc) · 750 Bytes
/
Copy pathdocker-entrypoint.sh
File metadata and controls
37 lines (28 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/bash
#
# the docker entry point -- setup environment and execute command / drop into shell
#
echo "================================================"
echo "Build docker container"
echo "================================================"
source /rustversion.sh
# source the cargo environment
source "$HOME/.cargo/env"
# this is the docker entrypoint
cd /source || exit
echo "setting rust versions to ${RUST_VERSION}"
cd kernel || exit
rustup default "${RUST_VERSION}"
cd ..
rustup default "${RUST_VERSION}"
# ensure rustup is up to date and we got the sources
rustup component add rust-src
rustup update
if [ "$1" == "" ]; then
echo "starting shell..."
exec "/bin/bash"
exit 0
else
echo "executing '$*'"
exec "$*"
fi