My first command: docker run -h myubuntu -t --net=host -e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/下載:/LAI -d --privileged --name myubuntu ubuntu
My second command: docker exec -it myubuntu bash
After everything is OK:
ubuntu@myubuntu:~$ firefox
Gtk-Message: 17:22:35.619: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:35.621: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:35.857: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:35.858: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:36.056: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:36.058: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:36.220: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:36.221: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:36.857: Failed to load module "canberra-gtk-module"
Gtk-Message: 17:22:36.858: Failed to load module "canberra-gtk-module"
[Child 9303, MediaDecoderStateMachine #1] WARNING: 7ff622aebe60 OpenCubeb() failed to init cubeb: file /build/firefox-X8LINN/firefox-76.0+build2/dom/media/AudioStream.cpp, line 328
[Child 9303, MediaDecoderStateMachine #1] WARNING: Decoder=7ff622a46800 [OnMediaSinkAudioError]: file /build/firefox-X8LINN/firefox-76.0+build2/dom/media/MediaDecoderStateMachine.cpp, line 3758
[Child 9303, MediaDecoderStateMachine #1] WARNING: 7ff61da7f460 OpenCubeb() failed to init cubeb: file /build/firefox-X8LINN/firefox-76.0+build2/dom/media/AudioStream.cpp, line 328
[Child 9303, MediaDecoderStateMachine #1] WARNING: Decoder=7ff61ca0cc00 [OnMediaSinkAudioError]: file /build/firefox-X8LINN/firefox-76.0+build2/dom/media/MediaDecoderStateMachine.cpp, line 3758
[Child 9303, MediaDecoderStateMachine #1] WARNING: Decoder=7ff622a46800 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /build/firefox-X8LINN/firefox-76.0+build2/dom/media/MediaDecoderStateMachine.cpp, line 3367