[docker] cannot-autolaunch-d-bus-without-x11-display 해결
갑자기 왜 ?????? 저 오류가 뜨면서 이미지 빌드가 안 됐는지는 모르겠지만
일단 나의 경우 Dockerfile 내에서 FROM 베이스이미지 <- 이 베이스 이미지 받아올 때 저 오류가 발생했다.
도커도 다시 설치 해보고 이래 저래 해 봤는데 여전히 저런 오류가 떴음.
찾아보니 원인은
By default, Docker looks for the native binary on each of the platforms; i.e., “osxkeychain” on macOS, “wincred” on windows, and “pass” on Linux. A special case is that on Linux, Docker will fall back to the “secretservice” binary if it cannot find the “pass” binary.
도커가 wide variety of credential helper를 지원 하는데 리눅스 운영체제에서는 pass binary를 찾을 수 없으면 그렇단다.
그래서 해결책은 아래와 같음. 나는 ubuntu 18.04(bionic) 쓰는 중이었다.
sudo apt-get install pass gnupg2
# create a gpg2 key
gpg2 --gen-key
# create the password store using the gpg user id
pass init $gpg_id
gen key 하고 나면 대충 저렇게 주루룩 뜨는데 저기 밑에 pub과 uid 사이에 '46~' 저게 gpg id인데 저걸 $gpg_id 자리에 넣어주면 된다.
다 하고 이미지 빌드 다시 해보면 잘 될것임.
https://anto.online/guides/cannot-autolaunch-d-bus-without-x11-display/ 글을 참고했다.