Score:0

Interactive Messages Crash Ubuntu Docker Container

us flag

Please keep in mind, I'm still learning Docker. I've only been at it for a few days. However, I'm trying to work with an Ubuntu:Latest Docker container. In the CMD line I have a shell script that runs some commands then an expect file.

Shell file:

#!/bin/bash
/mnt/scprime/spd /data -M gctwh &
sleep 45
expect /mnt/scprime/wallet.exp
Expect file:

#!/usr/bin/expect
set my_password mypass
spawn /mnt/scprime/spc wallet unlock
expect "Wallet password:" {send -- "$my_password\r"}
interact

I can run this script with no issues via bash within the container. But when I run it in a shell script in the CMD it crashes the container after the expect file runs. It seems to happen after the "interact" because the spc executable is interactive as it requests a password.

I've tried this and it still crashes.

#!/bin/bash
SCPRIME_WALLET_PASSWORD=mypass
export SCPRIME_WALLET_PASSWORD
/mnt/scprime/spc wallet unlock

I created a shell script and it crashes because it's interactive as well.

#!/bin/bash

apt-get -y install someapp

I'm trying to make this process as easy and possible without creating multiple images from existing containers after I install something. However, what am I doing wrong?

jp flag
Your question doesn’t include anything about your Docker environment. What is in the Dockerfile. How do you start your container?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.