forked from devcontainers-extra/features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
路115 lines (95 loc) 路 3.92 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
路115 lines (95 loc) 路 3.92 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/usr/bin/env bash
set -e
source ./library_scripts.sh
# nanolayer is a cli utility which keeps container layers as small as possible
# source code: https://github.com/devcontainers-extra/nanolayer
# `ensure_nanolayer` is a bash function that will find any existing nanolayer installations,
# and if missing - will download a temporary copy that automatically get deleted at the end
# of the script
ensure_nanolayer nanolayer_location "v0.4.39"
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/apt-get-packages:1.0.6" \
--option packages='curl'
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='curl -L https://cdn.porter.sh/latest/install-linux.sh | PORTER_VERSION=$VERSION PORTER_HOME=/usr/local/porter bash -s -- -x'
if [ -n "$TERRAFORMMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install terraform --version $TERRAFORMMIXINVERSION'
fi
if [ -n "$AZMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install az --version $AZMIXINVERSION'
fi
if [ -n "$AWSMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install aws --version $AWSMIXINVERSION'
fi
if [ -n "$DOCKERMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install docker --version $DOCKERMIXINVERSION'
fi
if [ -n "$DOCKERCOMPOSEMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install docker-compose --version $DOCKERCOMPOSEMIXINVERSION'
fi
if [ -n "$GCLOUDMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install gcloud --version $GCLOUDMIXINVERSION'
fi
if [ -n "$HELMMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install helm --version $HELMMIXINVERSION'
fi
if [ -n "$ARMMIXINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter mixin install arm --version $ARMMIXINVERSION'
fi
if [ -n "$AZUREPLUGINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter plugin install azure --version $AZUREPLUGINVERSION'
fi
if [ -n "$KUBERNETESPLUGINVERSION" ] ; then
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='/usr/local/porter/porter plugin install kubernetes --version $KUBERNETESPLUGINVERSION'
fi
$nanolayer_location \
install \
devcontainer-feature \
"ghcr.io/devcontainers-extra/features/bash-command:1.0.0" \
--option command='chown -hR ${_REMOTE_USER}:${_REMOTE_USER} /usr/local/porter'
echo 'Done!'