Ubuntu 20.04 버전을 쓰면서 가끔 ubuntu 18.04 버전을 써야하는 상황이 생기곤 합니다.
그럴 때 그 버전에 맞는 docker를 다운받아주기만 하면됩니다.
먼저 도커허브에서 ubuntu 도커공식이미지 페이지로 가줍니다.
https://hub.docker.com/_/ubuntu
여기서 그냥 docker pull ubuntu를 하면 lastest 태그를 다운받을 수 있으니 자신이 원하는 버전의 태그를 꼭 적어야 합니다.
Ubuntu18.04 버전 같은경우
docker pull ubuntu:bionic
를 해주면 18.04 버전의 ubuntu를 다운 받게 됩니다.
tag 카테고리로 가시면 다양한 버전을 보실 수 있습니다!
이미지를 다운 받고
docker images
를 쳐보면 다운받은 게 보여야 합니다.
잘 있다면 그에 대한 컨테이너를 만들어주어야겠죠?
저 같은 경우 qt, autoware 설치 목적이었어서 디스플레이(X11)환경도 구축했어야 합니다.
도커를 실행하면 Ubuntu18.04 버전을 가진 환경을 사용하실 수 있습니다.
docker run -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix ubuntu:bionic
xhost +
qt, autoware 설치까지 원하시는 분은 다음 블로그를 참고해주세요!
반응형
'docker' 카테고리의 다른 글
Docker 환경에서 X11 연결 오류 (Solved) (0) | 2023.04.25 |
---|---|
[Docker] pull, run, push 하기 (0) | 2023.04.13 |
Docker - 사용자 권한 부여하기 (0) | 2023.03.22 |