도커 | 알 수 없는 환경 `bash` | 하위 프로세스 /usr/bin/dpkg가 오류 코드(1)를 반환했습니다.

도커 | 알 수 없는 환경 `bash` | 하위 프로세스 /usr/bin/dpkg가 오류 코드(1)를 반환했습니다.

내 목표는 nordvpn을 설치하고 연결하여 실행되는 도커 컨테이너를 얻는 것입니다.

도커 컨테이너를 작동시키세요

sudo docker pull ubuntu:latest
sudo docker run -it ubuntu bash
// now im in the docker container
apt install update
apt install wget
wget {{nordvpn_link.deb}}
dpkg -i {{nordvpn_link.deb}}
// some errors about dependencies after above command so ...
apt install -f
// then
apt install nordvpn

첫 번째 큰 오류

root@f706a3f4012f:/home# apt install nordvpn
Reading package lists... Done
Building dependency tree       
Reading state information... Done
nordvpn is already the newest version (3.6.0-2).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up nordvpn (3.6.0-2) ...
[ERROR] Unknown environment `bash'
dpkg: error processing package nordvpn (--configure):
installed nordvpn package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
nordvpn
E: Sub-process /usr/bin/dpkg returned an error code (1)

나는 읽었다여기다음 명령을 실행하려면

dpkg --configure -a
// errors
Setting up nordvpn (3.6.0-2) ...
[ERROR] Unknown environment `bash'
dpkg: error processing package nordvpn (--configure):
installed nordvpn package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
nordvpn

일반 우분투 데스크탑 설치에서 프로세스가 원활하게 진행되면서 도커 컨테이너에서 왜 이런 일이 발생하는지 잘 모르겠습니다.

답변1

아직 알아냈는지 아닌지는 확실하지 않지만 설치 후 스크립트는 특별히 systemd/sysvinit 스크립트를 구성하기 위한 것입니다. 도커 컨테이너 내부에서 실행 중이므로 이들 중 어느 것도 없습니다.

궁금한 분들을 위해 스크립트는 PID 1이 있는 프로세스를 살펴보고 systemd를 실행하는지 sysvinit를 실행하는지 결정합니다. 그러나 이는 docker 내부에 있으므로 PID 1은 docker에 전달한 모든 명령(이 경우 bash)에 속하게 됩니다.

애플리케이션이 이미 설치되어 있으므로 오류를 무시해도 안전합니다.

관련 정보