-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathbuild.sh
More file actions
26 lines (20 loc) · 940 Bytes
/
build.sh
File metadata and controls
26 lines (20 loc) · 940 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
#!/bin/bash
#Ensure nothing happens outside the directory this script is ran from
cd "$(dirname "$0")"
SCRIPT_DIRECTORY=$(pwd)
ARCHITECTURE=""
case $(uname -m) in
i386) ARCHITECTURE="386" ;;
i686) ARCHITECTURE="386" ;;
x86_64) ARCHITECTURE="amd64" ;;
arm) dpkg --print-ARCHITECTURE | grep -q "arm64" && ARCHITECTURE="arm64" || ARCHITECTURE="arm" ;;
esac
echo "[INFO] Processor Architecture Detected as $ARCHITECTURE"
DOCKER_BASE_IMAGE="ubuntu:18.04"
DOCKER_FINAL_IMAGE_TAG="dorowu/ubuntu-desktop-lxde-vnc:bionic"
# Comment or Uncomment as needed to build the appropriate final image
# DOCKER_BASE_IMAGE="ubuntu:20.04"
# DOCKER_FINAL_IMAGE_TAG="dorowu/ubuntu-desktop-lxde-vnc:latest"
docker build -t "$DOCKER_FINAL_IMAGE_TAG" -f "Dockerfile.$ARCHITECTURE" \
--build-arg DOCKER_BASE_IMAGE="$DOCKER_BASE_IMAGE" \
$SCRIPT_DIRECTORY