expose icon indicating copy to clipboard operation
expose copied to clipboard

Error `The "-c" option does not exist.` when running latest(1.4.1) docker image

Open cpxPratik opened this issue 4 years ago • 13 comments

With the change of entry point to "/src/expose", the image now runs with command "/src/expose /bin/sh -c 'sed -i ....

But for some reason with this change, -c option is assumed to be from expose instead of sh. The container keeps restarting.

Contaienr log shows

Error `The "-c" option does not exist.

Previously on 1.3.4 version, it would run as "docker-php-entrypoint /bin/sh -c 'sed -i ...

cpxPratik avatar Dec 10 '20 11:12 cpxPratik

Same problem for me.

MeestorX avatar Dec 29 '20 02:12 MeestorX

+1 Same error here

PKeidel avatar Jan 04 '21 20:01 PKeidel

This is a conflict between ENTRYPOINT and CMD. Docker run /src/expose /bin/sh -c serve this way, which is not at all correct and makes the CMD part unusable. Also, it's necessary to create a custom sh script as entrypoint to run /src/expose. I've made a PR #174

matthieumota avatar Jan 06 '21 22:01 matthieumota

That PR does not resolve the issue for me when using docker compose.

For now, I have changed the docker-compose.yml from

    image: beyondcodegmbh/expose-server:latest

to

    image: beyondcodegmbh/expose-server:1.3.4

clarg18 avatar Feb 03 '21 22:02 clarg18

PR is not merged so with latest image, you don't get that fix. You need to clone PR and build manually if you want to try.

matthieumota avatar Feb 04 '21 06:02 matthieumota

While the PR is not merged and you want to run on latest image, change your docker-compose.yml to:

    image: beyondcodegmbh/expose-server:1.5.0 # or latest
    entrypoint: ["sh", "-c"]
    command: sed -i "s|username|${username}|g" ${exposeConfigPath} && sed -i "s|password|${password}|g" ${exposeConfigPath} && php expose serve ${domain} --port ${port} --validateAuthTokens

dbpolito avatar Feb 16 '21 20:02 dbpolito

The problem still persists... :(

TiiFuchs avatar Apr 27 '21 12:04 TiiFuchs

@TiiFuchs You can use my PR branch to fix problem. Wait to @mpociot to merge 🙏

matthieumota avatar Apr 27 '21 13:04 matthieumota

Any news regarding this? We have also this issue.

RogerSik avatar Jul 28 '21 08:07 RogerSik

@mpociot has merged #174 so if you also have issue, you need to update your package to Expose 2.

matthieumota avatar Jul 28 '21 08:07 matthieumota

@matthieumota we are using the docker-compose with the image: expose-server:2.0.2

With the tag 1.4.0 we dont have this issue and with beginning this 1.4.1. This occour. Do we need to more then only update the image tag?

RogerSik avatar Jul 28 '21 08:07 RogerSik

@RogerSik Be sure docker images is updated on your system. If we check on Docker Hub, image is properly build from last release

matthieumota avatar Jul 28 '21 08:07 matthieumota

@matthieumota yes it is. It seems to have something todo with the database. After a new setup with a new database the error message doesn't appear more.

RogerSik avatar Jul 28 '21 08:07 RogerSik

Closing this issue because it's old. Please feel free to open a new one if it's still relevant.

sschlein avatar Dec 21 '23 13:12 sschlein