aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docker/debian-dev/Dockerfile3
-rw-r--r--docker/debian-dev/bootstrap/func.bash8
-rwxr-xr-xdocker/debian-dev/bootstrap/setup.bash11
3 files changed, 21 insertions, 1 deletions
diff --git a/docker/debian-dev/Dockerfile b/docker/debian-dev/Dockerfile
index 53312de..83e5717 100644
--- a/docker/debian-dev/Dockerfile
+++ b/docker/debian-dev/Dockerfile
@@ -1,7 +1,10 @@
FROM debian:11
ARG IN_CHINA=
+ARG SETUP_SBUILD=
+
ENV IN_CHINA=${IN_CHINA}
+ENV SETUP_SBUILD=${SETUP_SBUILD}
ADD bootstrap /bootstrap
diff --git a/docker/debian-dev/bootstrap/func.bash b/docker/debian-dev/bootstrap/func.bash
index 82088f4..fb2ee77 100644
--- a/docker/debian-dev/bootstrap/func.bash
+++ b/docker/debian-dev/bootstrap/func.bash
@@ -1,3 +1,11 @@
+is_true() {
+ if [[ "$1" =~ 1|on|true ]]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
append-bash-profile() {
cat "/bootstrap/bash-profile/$1" >> /root/.bash_profile
}
diff --git a/docker/debian-dev/bootstrap/setup.bash b/docker/debian-dev/bootstrap/setup.bash
index d8d1546..2aa88e0 100755
--- a/docker/debian-dev/bootstrap/setup.bash
+++ b/docker/debian-dev/bootstrap/setup.bash
@@ -7,4 +7,13 @@ export DEBIAN_FRONTEND=noninteractive
/bootstrap/apt-source/setup.bash
/bootstrap/setup-base.bash
/bootstrap/setup-dev.bash
-/bootstrap/sbuild/setup.bash
+
+. /bootstrap/func.bash
+
+if is_true "$SETUP_SBUILD"; then
+ echo "Setup sbuild..."
+ /bootstrap/sbuild/setup.bash
+else
+ echo "Sbuild is disabled. Skipped."
+fi
+