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

🐳 spawn a new process failed if the dockerized app is built with a WORKDIR #105

Open
k33g opened this issue Jan 21, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working priority::1

Comments

@k33g
Copy link
Contributor

k33g commented Jan 21, 2024

FROM k33g/simplism:0.1.2

WORKDIR /app

COPY simplism-config.yaml .

EXPOSE 7000

CMD ["/simplism", "config", "./simplism-config.yaml", "faas-config"]

When deploying with:

curl -X POST \
http://localhost:9000/spawn \
--data-binary @- << EOF
{
    "wasm-file":"./tmp/hello-world.wasm", 
    "wasm-function":"handle",
    "wasm-url": "https://github.com/simplism-registry/hello-world/releases/download/v0.0.1/hello-world.wasm",
    "discovery-endpoint":"http://localhost:7000/discovery", 
    "service-name": "hello-world"
}
EOF

The process fails, and the container stops:

😡 Error when spawning a new simplism process: ./tmp/hello-world.wasm fork/exec ./simplism: no such file or directory

🤔 see https://github.com/bots-garden/simplism/blob/main/helpers/processes/processes-helper.go#L59C11-L59C28

cmd := &exec.Cmd{
  Path:   GetExecutablePath("simplism"),
  Args:   spawnArgs,
  Stdout: os.Stdout,
  Stderr: os.Stdout,
}

It looks like the GetExecutablePath does not return the appropriate path

@k33g k33g self-assigned this Jan 21, 2024
@k33g k33g added bug Something isn't working priority::1 labels Jan 21, 2024
@k33g k33g added this to the v0.1.3 🍔 [hamburger] milestone Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority::1
Projects
None yet
Development

No branches or pull requests

1 participant