互联网服务云计算

dockerfile制作image

你好!
   我想自己写一个dockerfile。希望满足
   1)里面采用ubuntu系统,安装xfce桌面和tightvnc,openssh等。
   2)将tightvnc的端口比如(5900)expose出来
   3)使外部的计算机(安装有guacamole或novnc)能通过第二步expose出来的端口,用web浏览器打开
请问该怎么写呢? 谢谢!
参与16

11同行回答

leonisleonis系统运维工程师软件公司
https://github.com/tutumcloud/tutum-ubuntu参考下这个吧显示全部
软件开发 · 2015-05-27
浏览7836
haoran8899haoran8899研发工程师成都牛途科技
docker run 报以下错误是什么原因呢?“/bin/cp: cannot create regular file '/etc/workaround-docker-2267/': Not a directory”---找到原因了。把from基础镜像弄错了:L显示全部
docker run 报以下错误是什么原因呢?
“/bin/cp: cannot create regular file '/etc/workaround-docker-2267/': Not a directory”


---找到原因了。把from基础镜像弄错了:L收起
互联网服务 · 2015-05-28
浏览7837
linux_zcylinux_zcy技术总监希云cSphere
已给你回复邮件!请查收!显示全部
已给你回复邮件!请查收!收起
互联网服务 · 2015-05-28
浏览3188
haoran8899haoran8899研发工程师成都牛途科技
回复 8# linux_zcy   谢谢你,问题已解决,我把基础镜像换了后,就ok了,如下:FROM phusion/baseimage:0.9.15但是build的时候还是报一些错误,不知道是什么原因,如果你知道的话,请告诉我,谢谢!!!以下是编译的一些错误消息:invoke-rc.d: policy-rc.d denied execution of start.i...显示全部
回复 8# linux_zcy


  谢谢你,问题已解决,我把基础镜像换了后,就ok了,如下:
FROM phusion/baseimage:0.9.15

但是build的时候还是报一些错误,不知道是什么原因,如果你知道的话,请告诉我,谢谢!!!
以下是编译的一些错误消息:
invoke-rc.d: policy-rc.d denied execution of start.
invoke-rc.d: unknown initscript, /etc/init.d/systemd-logind not found收起
互联网服务 · 2015-05-28
浏览7981
haoran8899haoran8899研发工程师成都牛途科技
回复 8# linux_zcy     已发你163邮箱,刚接触docker没多久,还请多多指教哈!!!显示全部
回复 8# linux_zcy


    已发你163邮箱,刚接触docker没多久,还请多多指教哈!!!收起
互联网服务 · 2015-05-27
浏览7814
haoran8899haoran8899研发工程师成都牛途科技
回复 3# linux_zcy 我现在自己弄了一个dockerfile    使用docker build的时候,报错!!!附dockerfile和build出错的信息。以下为一些出错的信息:invoke-rc.d: policy-rc.d denied execution of start.Setting up man-db (2.6.7.1-1ubuntu1) ...debconf: unable to ini...显示全部
回复 3# linux_zcy
我现在自己弄了一个dockerfile
   
使用docker build的时候,报错!!!
附dockerfile和build出错的信息。
以下为一些出错的信息:
invoke-rc.d: policy-rc.d denied execution of start.
Setting up man-db (2.6.7.1-1ubuntu1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Building database of manual pages ...
Setting up ntfs-3g (1:2013.1.13AR.1-2ubuntu2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
update-initramfs: deferring update (trigger activated)
Setting up x11-common (1:7.7+1ubuntu8.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
invoke-rc.d: policy-rc.d denied execution of start.
Setting up ca-certificates (20141019ubuntu0.14.04.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Setting up dictionaries-common (1.20.5) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
update-default-wordlist: Question empty but elements installed for class "wordlist"
  dictionaries-common/default-wordlist: return code: "0", value: ""
  Choices: , Manual symlink setting
  shared/packages-wordlist: return code: "10" owners/error: "shared/packages-wordlist doesn't exist"
  Installed elements: english (Webster's Second International English wordlist)

  Please see "/usr/share/doc/dictionaries-common/README.problems", section
  "Debconf database corruption" for recovery info.

update-default-wordlist: Selected wordlist ""
does not correspond to any installed package in the system
and no alternative wordlist could be selected.
dpkg: error processing package dictionaries-common (--configure):
subprocess installed post-installation script returned error exit status 255

Setting up lintian (2.5.22ubuntu1) ...
dpkg: dependency problems prevent configuration of miscfiles:
miscfiles depends on dictionaries-common (>= 0.20); however:
  Package dictionaries-common is not configured yet.

dpkg: error processing package miscfiles (--configure):
dependency problems - leaving unconfigured
Setting up ncurses-term (5.9+20140118-1ubuntu1) ...
Setting up notification-daemon (0.7.6-1) ...
Setting up openssh-sftp-server (1:6.6p1-2ubuntu2) ...
Setting up openssh-server (1:6.6p1-2ubuntu2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
invoke-rc.d: policy-rc.d denied execution of start.

Adding user pulse to group audio
invoke-rc.d: policy-rc.d denied execution of start.
Setting up aptdaemon (1.1.1-1ubuntu5.1) ...
Setting up xul-ext-ubufox (3.0-0ubuntu0.14.04.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up pulseaudio-module-x11 (1:4.0-0ubuntu11.1) ...
Setting up liblwp-protocol-https-perl (6.04-2ubuntu0.1) ...
Setting up libwww-perl (6.05-2) ...
Setting up xscreensaver-data (5.15-3ubuntu1) ...
Setting up xscreensaver (5.15-3ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
Processing triggers for initramfs-tools (0.103ubuntu4.2) ...
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.30.7-0ubuntu1) ...
Processing triggers for ca-certificates (20141019ubuntu0.14.04.1) ...
Updating certificates in /etc/ssl/certs... 173 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d....done.
Processing triggers for sgml-base (1.26+nmu4ubuntu1) ...
Errors were encountered while processing:
dictionaries-common
miscfiles
E: Sub-process /usr/bin/dpkg returned an error code (1)
INFO[2549] The command [/bin/sh -c apt-get update &&    apt-get -y install openssh-server pwgen tightvncserver firefox xfce4] returned a non-zero code: 100

附件:

附件图标Dockerfile (902 Bytes)

附件图标buildererr.txt (21.75 KB)

收起
互联网服务 · 2015-05-27
浏览8516
  • 所以请问这个dockerfile制作镜像装桌面最后成功了吗,这个问题怎么解决呢
    2019-09-24
胶东牛国磊胶东牛国磊系统架构师百度游戏
目前来说,很少使用docker来做图形化的使用的. docker 主要用来做为服务器端使用较多.显示全部
目前来说,很少使用docker来做图形化的使用的. docker 主要用来做为服务器端使用较多.收起
文化教育其它 · 2015-05-27
浏览7738
haoran8899haoran8899研发工程师成都牛途科技
回复 3# linux_zcy     OK!!!显示全部
回复 3# linux_zcy


    OK!!!收起
互联网服务 · 2015-05-27
浏览7737
haoran8899haoran8899研发工程师成都牛途科技
回复 2# leonis     谢谢!!!显示全部
回复 2# leonis


    谢谢!!!收起
互联网服务 · 2015-05-27
浏览7794
linux_zcylinux_zcy技术总监希云cSphere
1.你参考官方的Dockerfile,先熟悉Dockerfile的命令2.尝试去自己写,遇到问题后,再来交流good luck显示全部
1.你参考官方的Dockerfile,先熟悉Dockerfile的命令
2.尝试去自己写,遇到问题后,再来交流
good luck收起
互联网服务 · 2015-05-27
浏览7826

提问者

haoran8899
研发工程师成都牛途科技
擅长领域: 云计算

相关问题

相关资料

相关文章

问题状态

  • 发布时间:2015-05-26
  • 关注会员:1 人
  • 问题浏览:20135
  • 最近回答:2015-05-28
  • X社区推广