Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid configuration path #135

Open
nepster-web opened this issue May 17, 2021 · 6 comments
Open

Invalid configuration path #135

nepster-web opened this issue May 17, 2021 · 6 comments
Assignees

Comments

@nepster-web
Copy link

nepster-web commented May 17, 2021

I configured captainhook and I get an error with the configuration path.

изображение

This is due to the wrong path:
изображение

The right path for me: /api/captainhook.json (with slash)

but I can't put it in any way.

My command: captainhook install -f -s -c "/api/captainhook.json"

the first slash is always ignored

@nepster-web
Copy link
Author

$path2Config = $this->config->getRelativePathFrom($this->repository);

this is where the slash is lost

@sebastianfeldmann
Copy link
Collaborator

I know it is a bit counter intuitive that the relative path is used no matter what you do and especially for docker setups it would be best to use absolute path anyway. I will do some testing and make sure everything still works if I use the absolute path in that position. But this will take a bit of time.

In the meantime, you can specify the working directory for the docker exec command or define a default working dir in your container file.

Add working directory to exec command

{
  "config": {
    "run-mode": "docker",
    "run-exec": "docker exec CONTAINER_NAME --workdir=/"
  },
  ...
}

Define container working directory in your docker file

WORKDIR /

@nepster-web
Copy link
Author

nepster-web commented Jun 21, 2021

@sebastianfeldmann, so, what is the verdict?

@sebastianfeldmann
Copy link
Collaborator

Have you tried to define your working directory for your container?

@nepster-web
Copy link
Author

yes, it will work for WORKDIR /.
but this is not a solution to the problem when other WORKDIR.

now I have a lot of crutches in other commands.

изображение

@sebastianfeldmann
Copy link
Collaborator

🤔 good point, I will look into it a bit further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants