-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontainer_shell.rpm.spec
More file actions
44 lines (34 loc) · 1.06 KB
/
container_shell.rpm.spec
File metadata and controls
44 lines (34 loc) · 1.06 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
Name: ContainerShell
Version: VERSION
Release: 1
Summary: Drops you into a container, instead of the host environment.
License: Apache2
Source0: ContainerShell-VERSION.tar.gz
Url: https://github.com/willnx/container_shell
%description
To run a docker command you need to be root or part of the docker group (which
effectively is root). Container Shell avoids this by leveraging the setgid
permission, allowing a user that is not part of the docker group the ability to
access a admin-defined container.
%prep
%setup -q
%build
%install
echo ${buildroot}
rm -rf %{buildroot}
mkdir -p %{buildroot}
cp -R * %{buildroot}
%clean
rm -rf %{buildroot}
%post
chown root /usr/bin/container_shell
chmod u+s /usr/bin/container_shell
mkdir -p /var/log/container_shell
# Yeah, this is a bit cheesy, but it:
# A) Centralized the location of the log file
# B) Allows all users to write to it, without opening all of /var/log
# If you have a better idea, I'd love to hear what it is!
chmod 777 /var/log/container_shell
%files
/usr/bin/container_shell
/etc/container_shell/sample.config.ini