Comments (7)
I actually found the issue
i needed to add 'bind' in the 'options'
{
"type": "bind",
"source": "/home/user",
"destination": "/home/user",
"options": "bind"
}
not sure if this is a bug, but i would have expected type: bind to imply a bind mount
from runc.
Please don't just paste some logs into an issue. Especially not when they contain markdown directives. Put the logs between tripple backticks: ``` to let the logs render in a nice way.
from runc.
Currently it has the bind option supported as per the code.
Can you check whether your new directory is created inside your rootfs ?
if err := createIfNotExists(dest, stat.IsDir()); err != nil {
return err
}
if err := syscall.Mount(m.Source, dest, m.Device, uintptr(m.Flags), data); err != nil {
return err
}
if m.Flags&syscall.MS_RDONLY != 0 {
if err := syscall.Mount(m.Source, dest, m.Device, uintptr(m.Flags|syscall.MS_REMOUNT), ""); err != nil {
return err
}
}
if m.Relabel != "" {
if err := label.Relabel(m.Source, mountLabel, m.Relabel); err != nil {
return err
}
}
if m.Flags&syscall.MS_PRIVATE != 0 {
if err := syscall.Mount("", dest, "none", uintptr(syscall.MS_PRIVATE), ""); err != nil {
return err
}
}
from runc.
It is failing in the following call during the mount
if err := syscall.Mount(m.Source, dest, m.Device, uintptr(m.Flags), data); err != nil
from runc.
I could solve the problem via the code by adding MS_BIND
if err := syscall.Mount(m.Source, dest, m.Device,uintptr(syscall.MS_BIND),data); err != nil {
Instead of changing or modifying m.Flags, add the MS_BIND option in go code..
or modify container.json to include option bind..
from runc.
@InformatiQ On *nix systems, you need to specify mount -o bind /src /mnt
. The -o
maps to the option
field in the OCF format. There is no such filesystem type as bind
. In fact, the type
field is ignored in this case and if you make it empty it still would work. So really, it would be surprising if specifying the type of mount as bind
would work -- since that's now how mounting works.
@rajasec Please don't post large swathes of code in comments. Please either reference the code lines or just make a PR for review.
from runc.
that works fine for me
from runc.
Related Issues (20)
- [Alpine] docker top, runc ps fail with cgroup2 with: unable to get all container pids HOT 7
- semi-arbitrary cgroup resource write with malicious hugetlb configuration HOT 1
- container create failed (`lstat /proc/63538/ns/ipc: no such file or directory`) HOT 1
- Blockers for v1.2.0 HOT 7
- runc pod respawn will destroy Qemu processes (with pid 1) HOT 3
- (u|g)idMappings should not exist when joining an existing user ns HOT 9
- runc-dmz: Inheritable capabilities are dropped when they previously weren't HOT 16
- How to deal with the Configuration Conflict for user ns HOT 1
- containerd/crio passes invalid config.json HOT 2
- flaky test: TestProcessEmptyCaps
- Some namespace path joining errors together with user ns HOT 3
- FileLog Pipeline Not Closed, Causing runc exec to Hang HOT 2
- runc can not wait process in the container exits when share pid namespace HOT 4
- Reasons that can't use runc-dmz
- flaky test: kill KILL [host pidns] HOT 8
- flaky test: check_cpu_* HOT 1
- [ci] We should check `memory.swap.max` exists or not for cgroupv2 HOT 1
- Building runc 1.1.11 causes
- runc-dmz masks the error from unix.SYS_EXECVEAT HOT 12
- writing sync procError: write sync: file already closed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from runc.