2

I'm trying to start multiple service and mount tmpfs but cant find any way to pass "exec" permission to this command.

docker run -d \
  -it \
  --name tmptest \
  --mount type=tmpfs,destination=/app \
  nginx:latest

Its working perfectly with --tmpfs /tmp/test:exec when you start single container but i have been smashing my head to make it work with --mount type=tmpfs,destination=/app and still no luck to find anything.

Maybe any1 good any idea to work around it or im missing something.

2 Answers2

3

because --mount type=tmpfs,destination=/app by default runs with noexec flag which is not change able yet...

more details in this issue

guoard
  • 55
  • 1
  • 7
0

checked a lot of documents Neutralization solution

docker run *--privileged* --mount type=tmpfs,destination=/home/buildmc/test_build,tmpfs-size=429496729600,tmpfs-mode=0777
docker exec -it exec xxxx /bin/bash
sudo mount -o remount,rw,nosuid,nodev,exec,relatime,size=419430400k,mode=777 /home/buildmc/test_build/
mount | grep 'test_build'
tmpfs on /home/buildmc/test_build type tmpfs (rw,nosuid,nodev,relatime,size=419430400k,mode=777)