Open jyn514 opened 4 years ago
@jyn514 thank you for creating the issue! I hear a number of potential opportunities for improvement... Showing the container logs lines as they become available is one of them. Sounds like it might also be good to have extra login to guess if some of the parameters are missing... Can you share the final command line with docker-slim
? It'll be super helpful. Also sounds like it might be more convenient to have an ability to point docker-slim
to an existing docker-compose service profile, so it can figure out the parameters it should use.
@kcq Sure thing, although I'm not sure how helpful it will be ...
sudo $(which docker-slim) build --expose 3000 --show-clogs --network docsrs_default \
--env CRATESFYI_DATABASE_URL=postgresql://cratesfyi:password@db \
--env CRATESFYI_RUSTWIDE_WORKSPACE=/opt/docsrs/rustwide \
--mount "/var/run/docker.sock:/var/run/docker.sock" \
--mount "$(realpath .rustwide-docker):/opt/docsrs/rustwide" \
--mount "cratesio-index:/opt/docsrs/prefix/crates.io-index" \
docsrs_web
As you can see it's a pretty complicated setup :laughing: I think reading from docker-compose.yml files would be more helpful than 'did you forget a parameter' - you already said this and I didn't read lol
Also this command line is not currently working, it's just as far as I got it before giving up :/
Let me point you to the actual repo I'm running this on: https://github.com/rust-lang/docs.rs
This also requires running docker-compose up db
in a separate terminal.
I said it wasn't working, but now that I try again it seems to be working fine ... I think the issue is it has a fairly lengthy setup period but docker-slim tries to access the HTTP server immediately. Once I'd run it a couple times it finished initializing and the requests got though.
I'm trying to build a Dockerfile I normally run with docker-compose, so there's lots of arguments that I keep forgetting to add (
--mount
,--env
, etc.). It's painful to troubleshoot this because I have to wait fordocker-slim
to make five tries and timeout before I can see what the error is. Would it be possible to show the logs from--show-clogs
immediately, after the first HTTP failure?Current output:
Requested output: