leaningtech/webvm

Composer does not work

jaulz opened this issue ยท 2 comments

jaulz commented

First of all, thanks a lot for the great piece of technology! It looks really cool and promising ๐Ÿ˜Š However, I just tried to run a simple example with PHP and Composer:

FROM --platform=i386 i386/alpine:latest

# Install packages
RUN apk --no-cache add \
        bash \
        curl \
        nodejs \
        php81 \
        unzip \
        vim \
# Remove alpine cache
    && rm -rf /var/cache/apk/*

# Copy composer
COPY --from=i386/composer /usr/bin/composer /usr/bin/composer

# Add user
RUN adduser -D user && echo "user:password" | chpasswd

# We set WORKDIR, as this gets extracted by Webvm to be used as the cwd. This is optional.
WORKDIR /home/user/

# We set env, as this gets extracted by Webvm. This is optional.
ENV HOME="/home/user" TERM="xterm" USER="user" SHELL="/bin/bash" EDITOR="vim" LANG="en_US.UTF-8" LC_ALL="C"

# Set root password
RUN echo 'root:password' | chpasswd

CMD [ "/bin/bash" ]
```

Once loaded, I try to enter `composer` but it just hangs and says `[6:6] Fault addr 6d240a3b, ip 6d240a3b` in the console. Any idea what the issue could be?

We have taken a quick look and we can reproduce the crash, but there is no obvious problem to be seen. One of our engineers will try to debug the problem, but it might take some time for the fix to be ready.

The crash is now fixed, but the composer command immediately exists with the following message

env: can't execute 'php': No such file or directory

The exact same behavior happens on native, so this is an issue with the image rather than CheerpX.

Closing.