ktock / container2wasm

Container to WASM converter

Home Page:https://ktock.github.io/container2wasm-demo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to use low-privilege accounts in containers

Randark-JMT opened this issue · comments

I used the following Dockerfile to build the test image

FROM ubuntu:22.04

RUN useradd -m test && \
    echo "test:123" | chpasswd

USER test

Once the image is compiled, convert it to a wasm file and start the service, the following error is reported

image

/bin/bash: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: Permission denied

After switching to the root account for testing, you can find that this problem can be temporarily circumvented by executing the following command to change the file permissions

image

I've tested the above images directly with the original docker and they all run fine, I suspect the problem is in the Bochs layer, but that's just a guess.

@Randark-JMT I believe this has been fixed by v0.4.0. Could you try this with v0.4.0 or later?

Great, it's true that this problem exists on 0.3.0, but I've tested it on 0.4.0 and there's no problem!

Thank you very much for your reply!