Skip to content

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

Open
@k33g

Description

@k33g
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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions