You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.
I'm trying to run libcompose to start some Docker containers in some Go integration tests.
Here's the TestMain function that uses libcompose to set up and tear down the containers:
func TestMain(m *testing.M) {
project, err := docker.NewProject(&ctx.Context{
Context: project.Context{
ComposeFiles: []string{"docker-compose.yml"},
ProjectName: "ts2kusersvc",
},
}, nil)
if err != nil {
log.Fatal(err)
}
err = project.Up(context.Background(), options.Up{})
if err != nil {
log.Fatal(err)
}
// Without this blog, the code runs successfully
var code int
code, err = project.Run(context.Background(), "ts2kusersvc",
[]string{"-h"},
options.Run{},
)
// End problematic code block
if err != nil {
log.Fatal(err)
}
code = m.Run()
// Tear down Docker containers
err = project.Down(context.Background(), options.Down{})
if err != nil {
log.Fatal(err)
}
os.Exit(code)
}
The call to Run() in the above code fails with an "inappropriate ioctl for device" error, which I believe trickles up from Container.Runwhen calling term.SetRawTerminal.
I'm able to successfully execute the equivalent to my call to APIProject.Run via docker-compose run ....
The text was updated successfully, but these errors were encountered:
sorry for not being able to address this. I want to suggest an issue with a volume bind (are you mapping a local path) but I haven't had any time to put any real thoughts together.
In your docker-compose.yml, if you are using any volume binds, or custom volume plugins, can you specify:
do all local volume paths exist (are any of them symlinks or cross partition links or networked drives)
what volume plugins you are using
if you are populating any system volumes from image volumes.
so I think I just encountered the same bug here. I use libcompose to build our apps and when it's run inside Gitlab CI it fails with inappropriate ioctl for device. docker-compose run used to work, it was the setup we used before this tool.
I do bind 2 volumes to perform my tests. For example, I bind the src directory and pom.xml to my container when running a maven container for my tests.
Not sure where to go from there
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to run libcompose to start some Docker containers in some Go integration tests.
Here's the
TestMain
function that uses libcompose to set up and tear down the containers:The call to
Run()
in the above code fails with an "inappropriate ioctl for device" error, which I believe trickles up fromContainer.Run
when calling term.SetRawTerminal.I'm able to successfully execute the equivalent to my call to
APIProject.Run
viadocker-compose run ...
.The text was updated successfully, but these errors were encountered: