LoginSignup
1
5

DockerでGUI環境のUbuntu + pythonをサクっと構築する

Last updated at Posted at 2023-05-31

背景

検証環境等をubuntu-server等で構築しているときに、出力がGUI出ないといけない場合が時たまある。そういった場合、その”少し必要”に対してわざわざubuntuにVNCを構築するのは馬鹿らしい。そこで今回はコンテナでサクっとGUI環境を立ち上げる

手順

Dockerfileの作成

nano Dockerfile
FROM akarita/docker-ubuntu-desktop
RUN apt-get -y update && apt-get -y install nano python3-pip

Docker-compose.ymlの作成

nano docker-compose.yml
version: '3.3'
services:
    docker-ubuntu-desktop:
        ports:
            - '6080:6080'
        build: .
        container_name: 'guiubuntupy'
        working_dir: /root/
        volumes:
            - ./work:/root/Desktop
        

アクセス方法

http://X.X.X.X:6080/vnc.html

image.png

image.png
すごすぎる。。。。

参考文献

Dockerイメージ参照元

1
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
5