Running into a problem where tmux
does not initialize in a docker container file. Also, there is search-blockage in the form of people attaching tmux
to a pre-existing container. That is not what I am trying to do.
# in the dockerfile
FROM debian:latest
RUN apt-get install tmux
RUN tmux new -s foo -d
RUN tmux ls
_________________________
$: docker build .
...
> [8/8] RUN tmux ls:
#11 0.415 no server running on /tmp/tmux-0/default
------
executor failed running [/bin/sh -c tmux ls]: exit code: 1
What I am trying to do is run a couple of 'apps' that need to talk to each other at the same time. The idea is to avoid using docker compose for this particular problem.
I can easily run both commands as background processes.
But, I'd rather have them running in a tmux session that I can attach to when the image is running.
How does one launch tmux
inside the docker container during the build process?