Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit e9b4634

Browse files
authored
Add error if non-Debian/Ubuntu image encountered (CI Ignore)
1 parent a71724c commit e9b4634

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

script-library/container-features/src/install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
#!/usr/bin/env bash
22
set -e
33

4+
# Verify we're on a supported OS
5+
. /etc/os-release
6+
if [ "${ID}" != "debian" ] && [ "${ID_LIKE}" != "debian" ]; then
7+
cat << EOF
8+
9+
*********** Unsupported operating system "${ID}" detected ***********
10+
11+
Features support currently requires a Debian/Ubuntu-based image. Update your
12+
image or Dockerfile FROM statement to start with a supported OS. For example:
13+
mcr.microsoft.com/vscode/devcontainers/base:ubuntu
14+
15+
Aborting build...
16+
17+
EOF
18+
exit 2
19+
fi
20+
421
set -a
522
. ./features.env
623
set +a

0 commit comments

Comments
 (0)