docker / compose

Define and run multi-container applications with Docker
https://docs.docker.com/compose/
Apache License 2.0
33.98k stars 5.22k forks source link

Unable to log into vpn server after starting it's service #8501

Closed camdnd closed 2 years ago

camdnd commented 3 years ago

Hello, I try to run a shell script to start the service windscribe vpn and then login with the credentials for username and password. The script looks like this

#!/bin/sh

/etc/init.d/windscribe-cli start
windscribe login

it works when I run it from the host terminal and I get this

host@host-machine:~$ sh start.sh
Windscribe Username: example-username
Windscribe Password: example-password

I can login succesfully, but when I run the same script from a docker container after using the command sudo docker-compose up I get nothing, it just keeps waiting for something to happen but should be asking for username and password

host@host-machine:~$ sudo docker-compose up
app_1  | Starting windscribe ... OK

it should showing and the Windscribe Username: and Windscribe Password: lines to login but it never does

this is what I have in my Dockerfile

FROM ubuntu:latest
RUN apt-get update
#install windscribe
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-key FDC247B7
RUN echo 'deb https://repo.windscribe.com/ubuntu bionic main' | tee /etc/apt/sources.list.d/windscribe-repo.list
RUN apt-get -y update
RUN apt-get install -y windscribe-cli 

ENV HOME /home/host

COPY [ "start.sh" ,"./"]
ENTRYPOINT "/start.sh"
ndeloof commented 3 years ago

docker-compose up isn't an interactive command and as such you won't be able to use it to enter credentials. For this use case use docker-compose run <service> - and, by the way, give compose v2 a try by using docker compose run :)

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed because it had not recent activity during the stale period.