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

Error When docker-compose up -d #70

Open
rindibudiaramdhan opened this issue Jun 25, 2021 · 5 comments
Open

Error When docker-compose up -d #70

rindibudiaramdhan opened this issue Jun 25, 2021 · 5 comments

Comments

@rindibudiaramdhan
Copy link

I tried this boilerplate for first time for learning how to use yii2.
Then I followed How to Start, until I met this error.

image

When I read, it has error at ./api/Dockerfile. Then I change some code to try if that works.

from this,

RUN chmod 700 \
    /usr/local/bin/docker-entrypoint.sh \
    /usr/local/bin/composer

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- \
    # FIXME: Composer 2.0.0 is not compatible with fxp/composer-asset-plugin for now. Set version until it is fixed.
    --version=1.10.16 \
    --filename=composer.phar \
    --install-dir=/usr/local/bin && \
    composer global require --optimize-autoloader \
    "fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" \
    "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && \
    composer global dumpautoload --optimize && \
    composer clear-cache

to this,

# Install composer from the official image
COPY --from=composer:1 /usr/bin/composer /usr/local/bin/composer

RUN chmod +x \
        /usr/local/bin/docker-entrypoint.sh \
        /usr/local/bin/composer && \
    cd ~ && \
    composer global require --optimize-autoloader \
        "fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" \
        "hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && \
    composer global dumpautoload --optimize && \
    composer clear-cache

Then It works.

image

But something happened. In my docker, only mysql, nginx, and memcached are running.
image

in api container it show

standard_init_linux.go:228: exec user process caused: no such file or directory

in backend container it show

standard_init_linux.go:228: exec user process caused: no such file or directory

in frontend container it show

standard_init_linux.go:228: exec user process caused: no such file or directory

I dont know what happen. Anybody can explain me why and how to solve it?
Thank you so much.

btw, my OS is Windows 10 and I am using Docker Desktop for Windows.

@rindibudiaramdhan
Copy link
Author

i solved it because of this.
https://futurestud.io/tutorials/how-to-fix-exec-user-process-caused-no-such-file-or-directory-in-docker

maybe @chrisleekr @henryohanga can add this to troubleshoot if OS Windows.

@rindibudiaramdhan
Copy link
Author

image

@rindibudiaramdhan
Copy link
Author

maybe need change in app/Dockerfile like I note before

@chrisleekr
Copy link
Owner

chrisleekr commented Jul 2, 2021

@rindibudiaramdhan

I fixed to use composer 2. Please take a look and if it fixed, close the issue.

Thank you.

@rindibudiaramdhan
Copy link
Author

Sorry for very very late response. I have this new error
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants