dockerfile-plus icon indicating copy to clipboard operation
dockerfile-plus copied to clipboard

Instructions on how to debug and see logs from frontend container

Open aditya211935 opened this issue 3 years ago • 1 comments

When we do

# syntax = edrevo/dockerfile-plus

in a dockerfile, a docker container is launched from edrevo/dockerfile-plus image which contains the grpc server.

Is there any way to get logs from this frontend container for the purpose of debugging the build? This frontend container is short lived, so is there any way on getting the logs from this container?

I can see that some logs are being written to stderr in here https://github.com/edrevo/dockerfile-plus/blob/master/dockerfile-plus/src/dockerfile_frontend.rs#L111

Is there any way of seeing these logs? Even just being able to view stderr from the frontend container would suffice.

aditya211935 avatar Oct 16 '22 23:10 aditya211935

@edrevo I can see the frontend container's /usr/local/bin/dockerfile-plus process inside the container docker run -it --rm --privileged --pid=host alpine:edge nsenter -t 1 -m -u -n -i sh.

However, this process is short lived and I'm not sure on how to get its stderr logged.

aditya211935 avatar Oct 17 '22 00:10 aditya211935