docker command seems to be not working correctly

suryapratap-r
HOBBY

5 days ago

my project: https://github.com/Suryapratap-R/cc-hub

deploy log
```Starting Container

out CLI

Usage:

out [command]

Available Commands:

migrate Executes app DB migration scripts

serve Starts the web server (default to 127.0.0.1:8090 if no domain is specified)

superuser Manage superusers

Flags:

  --dev                    enable dev mode, aka. printing logs and sql statements to the console

  --dir string             the PocketBase data directory (default "pb_data")

  --encryptionEnv string   the env variable whose value of 32 characters will be used 

                           as encryption key for the app settings (default none)

-h, --help help for out

  --queryTimeout int       the default SELECT queries timeout in seconds (default 30)

-v, --version version for out

Use "out [command] --help" for more information about a command.
```

this should only happen when serve command is not working, this is working fine locally

project Id: 6b8d34b2-5176-42dd-84d5-2fb2c9ae7542

$10 Bounty

2 Replies

suryapratap-r
HOBBY

3 days ago

bump


clashing
FREETop 1% Contributor

2 days ago

I guess there are some corrections need to be done in your DockerFile (thanks for providing it beforehand in the GitHub repo):

Change line 17 from

RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /app/pocketbase_app .

to

RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /app/out .

Change line 32 from

COPY --from=builder /app/pocketbase_app .

to

COPY --from=builder /app/out .

And finally, do this for line 37

ENTRYPOINT [ "./pocketbase_app", "serve", "--http=0.0.0.0:8080" ]

to

ENTRYPOINT [ "./out", "serve", "--http=0.0.0.0:8080" ]

Do let me know if that works or not (make sure to update the docker image which you are using in the Railway service)


clashing

I guess there are some corrections need to be done in your DockerFile (thanks for providing it beforehand in the GitHub repo):Change line 17 fromRUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /app/pocketbase_app .toRUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o /app/out .Change line 32 fromCOPY --from=builder /app/pocketbase_app .toCOPY --from=builder /app/out .And finally, do this for line 37ENTRYPOINT [ "./pocketbase_app", "serve", "--http=0.0.0.0:8080" ]toENTRYPOINT [ "./out", "serve", "--http=0.0.0.0:8080" ]Do let me know if that works or not (make sure to update the docker image which you are using in the Railway service)

clashing
FREETop 1% Contributor

a day ago

Did that help, suryapratap-r?

If yes, then please mark my initial reply as the solution


docker command seems to be not working correctly - Railway Help Station