forked from openmsa/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit
More file actions
executable file
·35 lines (21 loc) · 837 Bytes
/
init
File metadata and controls
executable file
·35 lines (21 loc) · 837 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
27
28
29
30
31
32
33
34
35
#!/bin/bash
docker build -t rpm-build - <<EOT
FROM fedora:29
RUN yum -y groupinstall 'Development Tools'
RUN yum -y install fedora-packager libffi-devel zlib-devel
RUN yum -y remove yum-utils
RUN yum -y install yum-utils
RUN yum -y install sudo rsync php
RUN sed -i.bak -n -e '/^Defaults.*requiretty/ { s/^/# /;};/^%wheel.*ALL$/ { s/^/# / ;} ;/^#.*wheel.*NOPASSWD/ { s/^#[ ]*//;};p' /etc/sudoers
RUN yum install -y https://rdo.fedorapeople.org/rdo-release.rpm
RUN useradd -s /bin/bash -G adm,wheel,systemd-journal -m rpm
RUN yum clean all
RUN pip3 install pdoc3
# https://denibertovic.com/posts/handling-permissions-with-docker-volumes/
RUN echo -e '#!/bin/bash \n\
usermod -u \${USER_ID:-1000} rpm \n\
exec sudo -H -u rpm "\$@" \n\
' > /tmp/entrypoint \
&& chmod +x /tmp/entrypoint
ENTRYPOINT ["/tmp/entrypoint"]
EOT