Skip to content

Commit 22dd429

Browse files
committed
use internal tmpfs for /tmp to allow exec
1 parent 3f434a6 commit 22dd429

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

c7

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,14 @@ volumes="
143143
"
144144

145145
devices="-v /dev/ttyS0:/dev/ttyS0"
146-
opts="${network} --hostname ${hostname} --security-opt=label=type:container_runtime_t"
146+
opts="${network} --hostname ${hostname} --security-opt=label=disable"
147+
# Get around the issue of /tmp being mounted noexec by creating our own tmpfs
148+
opts="${opts} --mount type=tmpfs,destination=/tmp"
147149

148150
# the identity settings enable secondary groups in the container
149151
if [[ ${rhel} == 8 ]] ; then
150152
identity="${userns}
151153
--annotation run.oci.keep_original_groups=1"
152-
volumes="${volumes} -v /tmp:/tmp"
153154
fi
154155

155156
# this runtime is also required for secondary groups

0 commit comments

Comments
 (0)