You need to include the following lines in your docker-compose.yml:
version: "3"
services:
app:
image: app:1.2.3
stdin_open: true # docker run -i
tty: true # docker run -t
The first corresponds to -i
in docker run
and the second to -t
.
More Related Contents:
- How do I prevent root access to my docker container
- What does set -e and exec “$@” do for docker entrypoint scripts?
- How to check if a process is running inside docker container?
- nginx: use environment variables
- How to set uid and gid in Docker Compose?
- shell – remove numbers from a string column [closed]
- What’s the difference between .bashrc, .bash_profile, and .environment?
- Shell command to sum integers, one per line?
- Access docker container from host using containers name
- How to persist data in a dockerized postgres database using volumes
- What’s an easy way to read random line from a file?
- commands not found on zsh [closed]
- Rename multiple files by replacing a particular pattern in the filenames using a shell script [duplicate]
- How do you catch error codes in a shell pipe?
- Concise and portable “join” on the Unix command-line
- How to add timestamp to STDERR redirection
- is it possible to use variables in remote ssh command?
- How to set a path on host for a named volume in docker-compose.yml
- Permission denied at hdfs
- How to do multiline shell script in Ansible
- What is the alternative to condition form of depends_on in docker-compose Version 3?
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- How to grep a text file which contains some binary data?
- How can I pass variables from awk to a shell command?
- Docker container doesn’t reload Angular app
- Read file into String and do a loop in Expect Script
- How to run commands via NodeJS child process?
- How to run SWI-Prolog from the command line?
- django cannot connect mysql in docker-compose
- docker entrypoint running bash script gets “permission denied”