My Dockerfile is
FROM node:4
RUN npm install -g yarn
WORKDIR /app
I run docker run -d and mount my current working directory as a volume. All the deps are installed by yarn. I have a npm script to lint the files.
If I do docker exec -it [container] npm run lint it works as expected and I can see all the logs. But if I do docker exec -itd [container] npm run lint, it exits immediately which is expected. But I can't see the logs by running docker logs [container]. How do I reattach the exec or just see to the logs?
I tried docker attach [container] it goes to the repl of nodejs. Why is that?