linux-containers

How to edit a file dynamically in a running docker container

拟墨画扇 提交于 2019-12-04 14:09:06
Background I had build a npm server(sinopia) docker image( https://github.com/feuyeux/docker-atue/blob/master/docker-images/feuyeux_sinopia.md ), and in the CMD line, it will run the start.sh every time when the container is generated. CMD ["/opt/sinopia/start.sh"] This shell will create a yaml file dynamically. sed -e 's/\#listen\: localhost/listen\: 0.0.0.0/' -e 's/allow_publish\: admin/allow_publish\: all/' /tmp/config.yaml > /opt/sinopia/config.yaml Question I wish I could edit this config.yaml when the container is running, because I hope the content should be changed on demand. see the

Docker how to change repository name or rename image?

痞子三分冷 提交于 2019-12-04 07:17:40
问题 I'm trying to change repository name of the image: REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE server latest d583c3ac45fd 26 minutes ago 685.5 MB Hence I want to change the name server to something like myname/server : REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE myname/server latest d583c3ac45fd 26 minutes ago 685.5 MB How can I do this? 回答1: docker tag server:latest myname/server:latest or docker tag d583c3ac45fd myname/server:latest Tags are just human-readable aliases for the full image

Installing chef-server in a docker container

折月煮酒 提交于 2019-12-03 09:38:56
问题 I have been trying to install Chef-Server in a Docker container and I am having some trouble. I am running a VM with an up to date version of Ubuntu 12.04 and latest install of Docker. I run a base Docker Ubuntu 12.04 container and install chef-server, version 11.0.12 and that goes well. The problem is running the required 'sudo chef-server-ctl reconfigure' step after install. The setup freezes at * link[/opt/chef-server/init/rabbitmq] action create (up to date) * link[/opt/chef-server

Does a docker container have its own TCP/IP stack?

我们两清 提交于 2019-12-03 05:36:28
问题 I'm trying to understand what's happening under the hood to a network packet coming from the wire connected to the host machine and directed to an application inside a Docker container. If it were a classic VM, I know that a packet arriving on the host would be transmitted by the hypervisor (say VMware, VBox etc.) to the virtual NIC of the VM and from there through the TCP/IP stack of the guest OS, finally reaching the application. In the case of Docker, I know that a packet coming on the

Docker container - how to configure so it gets a viable IP address when running in vagrant?

一世执手 提交于 2019-12-03 04:35:06
问题 Docker (www.docker.io) looks terrific. However, after installing VirtualBox, Vagrant ... and finally Docker on a Mac, I'm finding it's not possible to access the service running in the Docker container from another computer (or from a terminal session on the Mac). The service I'm trying to access is Redis. The problem appears to be that there's no route to the IP address assigned to the Docker container. In this case the container's IP is 172.16.42.2 while the Mac's IP is 196.168.0.3. A

Installing chef-server in a docker container

烂漫一生 提交于 2019-12-03 00:07:30
I have been trying to install Chef-Server in a Docker container and I am having some trouble. I am running a VM with an up to date version of Ubuntu 12.04 and latest install of Docker. I run a base Docker Ubuntu 12.04 container and install chef-server, version 11.0.12 and that goes well. The problem is running the required 'sudo chef-server-ctl reconfigure' step after install. The setup freezes at * link[/opt/chef-server/init/rabbitmq] action create (up to date) * link[/opt/chef-server/service/rabbitmq] action create (up to date) * **ruby_block[supervise_rabbitmq_sleep] action run** and I get

Does a docker container have its own TCP/IP stack?

这一生的挚爱 提交于 2019-12-02 18:54:51
I'm trying to understand what's happening under the hood to a network packet coming from the wire connected to the host machine and directed to an application inside a Docker container. If it were a classic VM, I know that a packet arriving on the host would be transmitted by the hypervisor (say VMware, VBox etc.) to the virtual NIC of the VM and from there through the TCP/IP stack of the guest OS, finally reaching the application. In the case of Docker, I know that a packet coming on the host machine is forwarded from the network interface of the host to the docker0 bridge, that is connected

Docker container - how to configure so it gets a viable IP address when running in vagrant?

妖精的绣舞 提交于 2019-12-02 17:43:52
Docker (www.docker.io) looks terrific. However, after installing VirtualBox, Vagrant ... and finally Docker on a Mac, I'm finding it's not possible to access the service running in the Docker container from another computer (or from a terminal session on the Mac). The service I'm trying to access is Redis. The problem appears to be that there's no route to the IP address assigned to the Docker container. In this case the container's IP is 172.16.42.2 while the Mac's IP is 196.168.0.3. A couple notes: It IS possible to access it - but only from within the VirtualBox session. This can be done

Docker how to change repository name or rename image?

假如想象 提交于 2019-12-02 13:46:41
I'm trying to change repository name of the image: REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE server latest d583c3ac45fd 26 minutes ago 685.5 MB Hence I want to change the name server to something like myname/server : REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE myname/server latest d583c3ac45fd 26 minutes ago 685.5 MB How can I do this? Andy docker tag server:latest myname/server:latest or docker tag d583c3ac45fd myname/server:latest Tags are just human-readable aliases for the full image name ( d583c3ac45fd... ). So you can have as many of them associated with the same image as you like.

How to configure a Docker container to be reachable by container_ip:port from outside the host machine?

。_饼干妹妹 提交于 2019-11-30 13:14:45
I have a host machine with multiple IP addresses assigned to one network interface. I'd like to configure Docker in order to have containers "responding" each one to a single IP of these IP addresses assigned to the host machine. Can this be done with libcontainer or do I have to use the LXC driver and run my containers with --lxc-conf="lxc.network..." ? Thanks in advance. UPDATE I want each container to be reachable from outside; with the default Docker configuration I can only expose a port and reach the container by host_ip:exposed_port and not by container_ip:port . Can this second option