#as-service up with an WithEntrypoint

1 messages · Page 1 of 1 (latest)

brazen vector
#

Hello !

First of all, I'd like to thanks the team for this project, i'm realy falling in love with dagger, gained so much time writing pipelines !

While trying to check my resulting container, I get connexion refused, I tried pusblishing the image and running it locally I can in fact access my app.

is there something i'm missing ? I didn't have any problem with an nginx container (this one doesn't have a custom WithEntrypoint)

WRN port not ready host=e7es0aiilia2i.005cv4rvo9r5g.dagger.local error="dial tcp 10.87.0.139:3000: connect: connection refused" elapsed=8.209143503s
    container, err := build.
        WithEntrypoint([]string{packageManager, "run", "start"}).
        WithExposedPort(*ExposedPort).
        Sync(ctx)

delicate crypt
#

Hi @brazen vector , glad you're enjoying dagger! Does it work if you use WithDefaultArgs instead of WithEntrypoint?

brazen vector
#

it gives me the same result. is as-service up supposed to work with entrypoint ? I don't have any debugging idea, since the docker image works, and going in the terminal prior runing the command manualy works also

woeful nymph
#

Do you have any WithExec in that Container?

brazen vector
#

Yes build is a func that returns a *dagger.Container with

    command := []string{packageManager, "run", "build"}
    build, err := m.BuildEnv(source).
        WithExec(command).
        Sync(ctx)
#

but this one works properly and wouldn't see any link with my issue

woeful nymph
#

Ok, so you need an empty WithExec([]string{}) before that Sync.