chrisleekr / yii2-angular-boilerplate

Yii2 REST API + Angular 12 Boilerplate (Frontend/Backend)

Home Page:https://yam-boilerplate.chrislee.kr/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error When `docker-compose up -d`

rindibudiaramdhan opened this issue · comments

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.

maybe need change in app/Dockerfile like I note before

@rindibudiaramdhan

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

Thank you.

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