-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.sh
53 lines (47 loc) · 953 Bytes
/
setup.sh
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
#! /bin/bash
# Copyright Peter Williams <[email protected]>
# Licensed under the MIT License.
#
# Set up an image that's ready to build Conda packages repeatably.
set -ex
# Base packages (keep alphabetized!)
yum install -y $(echo "
bison
bzip2
curl
emacs-nox
file
flex
git
glibc-devel
libstdc++-devel
make
man
man-pages
mesa-libEGL-devel
ncompress
patch
perl-XML-Parser
pkgconfig
strace
subversion
sudo
tar
tcsh
wget
which
xz
zip
")
# Set up a user whose UID/GID match the person building the container. A
# fancier setup would be to do this on container bootup, since different users
# could want to use the same image.
groupadd -g $EXTGRPID -o conda
useradd --shell /bin/bash -u $EXTUSERID -g conda -G wheel -o -c "" -m conda
mkdir /conda
chown conda:conda /conda
# Farm out to the unprivileged script
su -l conda -c "bash -x /setup-unpriv.sh"
# Docker infrastructure cleanup
chmod +x /entrypoint.sh
rm /setup.sh /setup-unpriv.sh # self-destruct!