Common-utils: Fix build failures for alpine 3.14 & 3.15 (#393)
* Common-utils: Fix build failures for alpine 3.14 & 3.15 * version bump
This commit is contained in:
parent
c8f5c3cbee
commit
e67f4dc0fd
5 changed files with 47 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"id": "common-utils",
|
"id": "common-utils",
|
||||||
"version": "2.0.5",
|
"version": "2.0.6",
|
||||||
"name": "Common Utilities",
|
"name": "Common Utilities",
|
||||||
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
|
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils",
|
||||||
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
|
"description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.",
|
||||||
|
|
|
@ -407,6 +407,8 @@ if [ "${RC_SNIPPET_ALREADY_ADDED}" != "true" ]; then
|
||||||
;;
|
;;
|
||||||
"alpine")
|
"alpine")
|
||||||
global_rc_path="/etc/bash/bashrc"
|
global_rc_path="/etc/bash/bashrc"
|
||||||
|
# /etc/bash/bashrc does not exist in alpine 3.14 & 3.15
|
||||||
|
mkdir -p /etc/bash
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> ${global_rc_path}
|
cat "${FEATURE_DIR}/scripts/rc_snippet.sh" >> ${global_rc_path}
|
||||||
|
|
15
test/common-utils/alpine-3-14.sh
Executable file
15
test/common-utils/alpine-3-14.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Optional: Import test library
|
||||||
|
source dev-container-features-test-lib
|
||||||
|
|
||||||
|
# Definition specific tests
|
||||||
|
. /etc/os-release
|
||||||
|
check "non-root user" test "$(whoami)" = "devcontainer"
|
||||||
|
check "distro" test "${ID}" = "alpine"
|
||||||
|
check "bashrc" ls /etc/bash/bashrc
|
||||||
|
|
||||||
|
# Report result
|
||||||
|
reportResults
|
15
test/common-utils/alpine-3-15.sh
Executable file
15
test/common-utils/alpine-3-15.sh
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Optional: Import test library
|
||||||
|
source dev-container-features-test-lib
|
||||||
|
|
||||||
|
# Definition specific tests
|
||||||
|
. /etc/os-release
|
||||||
|
check "non-root user" test "$(whoami)" = "devcontainer"
|
||||||
|
check "distro" test "${ID}" = "alpine"
|
||||||
|
check "bashrc" ls /etc/bash/bashrc
|
||||||
|
|
||||||
|
# Report result
|
||||||
|
reportResults
|
|
@ -115,6 +115,20 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"alpine-3-14": {
|
||||||
|
"image": "alpine:3.14",
|
||||||
|
"remoteUser": "devcontainer",
|
||||||
|
"features": {
|
||||||
|
"common-utils": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"alpine-3-15": {
|
||||||
|
"image": "alpine:3.15",
|
||||||
|
"remoteUser": "devcontainer",
|
||||||
|
"features": {
|
||||||
|
"common-utils": {}
|
||||||
|
}
|
||||||
|
},
|
||||||
"devcontainer-info": {
|
"devcontainer-info": {
|
||||||
"build": {
|
"build": {
|
||||||
"dockerfile": "Dockerfile"
|
"dockerfile": "Dockerfile"
|
||||||
|
|
Loading…
Reference in a new issue