Skip to content

Instantly share code, notes, and snippets.

@koji
Created April 9, 2019 04:08
Show Gist options
  • Save koji/865f3349c4a3f22debd723db71b8e475 to your computer and use it in GitHub Desktop.
Save koji/865f3349c4a3f22debd723db71b8e475 to your computer and use it in GitHub Desktop.
Create Ubuntu Desktop with Docker

Setup

$ docker pull ubuntu
$ docker run --name ubuntu-xrdp -it ubuntu bash
inside docker
$ apt-get update -y
$ apt-get upgrade -y
$ apt-get install xrdp -y
$ apt-get install lxde
$ apt-get install net-tools
Please select the geographic area in which you live. Subsequent configuration questions will narrow this down by presenting a list of cities,
representing the time zones in which they are located.

  1. Africa   3. Antarctica  5. Arctic Ocean  7. Atlantic Ocean  9. Indian Ocean    11. System V timezones  13. None of the above
  2. America  4. Australia   6. Asia          8. Europe          10. Pacific Ocean  12. US
Geographic area: 2

Please select the city or region corresponding to your time zone.

  1. Adak                     32. Campo_Grande   63. Guayaquil             94. Menominee                125. Recife
  2. Anchorage                33. Cancun         64. Guyana                95. Merida                   126. Regina
  3. Anguilla                 34. Caracas        65. Halifax               96. Metlakatla               127. Resolute
  4. Antigua                  35. Cayenne        66. Havana                97. Mexico_City              128. Rio_Branco
  5. Araguaina                36. Cayman         67. Hermosillo            98. Miquelon                 129. Santa_Isabel
  6. Argentina/Buenos_Aires   37. Chicago        68. Indiana/Indianapolis  99. Moncton                  130. Santarem
  7. Argentina/Catamarca      38. Chihuahua      69. Indiana/Knox          100. Monterrey               131. Santiago
  8. Argentina/Cordoba        39. Coral_Harbour  70. Indiana/Marengo       101. Montevideo              132. Santo_Domingo
  9. Argentina/Jujuy          40. Costa_Rica     71. Indiana/Petersburg    102. Montreal                133. Sao_Paulo
  10. Argentina/La_Rioja      41. Creston        72. Indiana/Tell_City     103. Montserrat              134. Scoresbysund
  11. Argentina/Mendoza       42. Cuiaba         73. Indiana/Vevay         104. Nassau                  135. Shiprock
  12. Argentina/Rio_Gallegos  43. Curacao        74. Indiana/Vincennes     105. New_York                136. Sitka
  13. Argentina/Salta         44. Danmarkshavn   75. Indiana/Winamac       106. Nipigon                 137. St_Barthelemy
  14. Argentina/San_Juan      45. Dawson         76. Inuvik                107. Nome                    138. St_Johns
  15. Argentina/San_Luis      46. Dawson_Creek   77. Iqaluit               108. Noronha                 139. St_Kitts
  16. Argentina/Tucuman       47. Denver         78. Jamaica               109. North_Dakota/Beulah     140. St_Lucia
  17. Argentina/Ushuaia       48. Detroit        79. Juneau                110. North_Dakota/Center     141. St_Thomas
  18. Aruba                   49. Dominica       80. Kentucky/Louisville   111. North_Dakota/New_Salem  142. St_Vincent
  19. Asuncion                50. Edmonton       81. Kentucky/Monticello   112. Ojinaga                 143. Swift_Current
  20. Atikokan                51. Eirunepe       82. Kralendijk            113. Panama                  144. Tegucigalpa
  21. Atka                    52. El_Salvador    83. La_Paz                114. Pangnirtung             145. Thule
  22. Bahia                   53. Ensenada       84. Lima                  115. Paramaribo              146. Thunder_Bay
  23. Bahia_Banderas          54. Fort_Nelson    85. Los_Angeles           116. Phoenix                 147. Tijuana
  24. Barbados                55. Fortaleza      86. Lower_Princes         117. Port-au-Prince          148. Toronto
  25. Belem                   56. Glace_Bay      87. Maceio                118. Port_of_Spain           149. Tortola
  26. Belize                  57. Godthab        88. Managua               119. Porto_Acre              150. Vancouver
  27. Blanc-Sablon            58. Goose_Bay      89. Manaus                120. Porto_Velho             151. Virgin
  28. Boa_Vista               59. Grand_Turk     90. Marigot               121. Puerto_Rico             152. Whitehorse
  29. Bogota                  60. Grenada        91. Martinique            122. Punta_Arenas            153. Winnipeg
  30. Boise                   61. Guadeloupe     92. Matamoros             123. Rainy_River             154. Yakutat
  31. Cambridge_Bay           62. Guatemala      93. Mazatlan              124. Rankin_Inlet            155. Yellowknife
Time zone: 105
$ passwd
$ exit

start container

$ docker commit ubuntu-xrdp ubuntu-dt
$ docker run --name ubuntu-dt -p 13389:3389 -it ubuntu-dt bash

start xrdp

$ /etc/init.d/xrdp stop
$ /etc/init.d/xrdp start

remote login


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment