iw4p / OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv

[Script and Docker 🐳] OpenConnect (Cisco AnyConnect) VPN Server (OCServ) script one key easy configurator and installer
263 stars 143 forks source link

can only start exec sessions when their container is running: container state improper #45

Open jemshit opened 1 year ago

jemshit commented 1 year ago

OC: CentOS 8

Command history:

# docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d --restart unless-stopped ocserv
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
1b12cc60ca1d65e234acb6096ea5679367d4084e3482a041ed6c3b67306c1230

# docker exec -ti ocserv ocpasswd -c /etc/ocserv/ocpasswd username
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
Error: can only start exec sessions when their container is running: container state improper

How to fix this?

iw4p commented 1 year ago

Please tell me what did you get when you use

docker build -t ocserv https://github.com/iw4p/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv.git

and

docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d ocserv ?

jemshit commented 1 year ago

docker build -t ocserv https://github.com/iw4p/OpenConnect-Cisco-AnyConnect-VPN-Server-OneKey-ocserv.git

Output of this is veeery long, it ends with

Successfully tagged localhost/ocserv:latest
9720cf3a863a5add1975b05d2f65d7df7defaec041352521e2d6af8862786693

docker run --name ocserv --privileged -p 443:443 -p 443:443/udp -d ocserv

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
d7c5e559a439df05df0ebc52104647e6bba851a3cbdf5f8bcae00c965e99fec2
iw4p commented 1 year ago

I have no experience with podman and you are using podman. Maybe it needs more commands or it is different from docker. If it is possible for you, please use docker instead of podman or ask somebody who is more experienced in DevOps :bowtie: