mirror of https://github.com/docker/docs.git
commit
1df87acb33
|
@ -1,5 +1,14 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.1.2 (2014-07-23)
|
||||||
|
|
||||||
|
#### Runtime
|
||||||
|
+ Fix port allocation for existing containers
|
||||||
|
+ Fix containers restart on daemon restart
|
||||||
|
|
||||||
|
#### Packaging
|
||||||
|
+ Fix /etc/init.d/docker issue on Debian
|
||||||
|
|
||||||
## 1.1.1 (2014-07-09)
|
## 1.1.1 (2014-07-09)
|
||||||
|
|
||||||
#### Builder
|
#### Builder
|
||||||
|
|
|
@ -89,7 +89,11 @@ case "$1" in
|
||||||
chgrp docker "$DOCKER_LOGFILE"
|
chgrp docker "$DOCKER_LOGFILE"
|
||||||
|
|
||||||
ulimit -n 1048576
|
ulimit -n 1048576
|
||||||
|
if [ "$BASH" ]; then
|
||||||
ulimit -u 1048576
|
ulimit -u 1048576
|
||||||
|
else
|
||||||
|
ulimit -p 1048576
|
||||||
|
fi
|
||||||
|
|
||||||
log_begin_msg "Starting $DOCKER_DESC: $BASE"
|
log_begin_msg "Starting $DOCKER_DESC: $BASE"
|
||||||
start-stop-daemon --start --background \
|
start-stop-daemon --start --background \
|
||||||
|
|
|
@ -422,8 +422,17 @@ func (container *Container) allocateNetwork() error {
|
||||||
if container.Config.ExposedPorts != nil {
|
if container.Config.ExposedPorts != nil {
|
||||||
portSpecs = container.Config.ExposedPorts
|
portSpecs = container.Config.ExposedPorts
|
||||||
}
|
}
|
||||||
|
|
||||||
if container.hostConfig.PortBindings != nil {
|
if container.hostConfig.PortBindings != nil {
|
||||||
bindings = container.hostConfig.PortBindings
|
for p, b := range container.hostConfig.PortBindings {
|
||||||
|
bindings[p] = []nat.PortBinding{}
|
||||||
|
for _, bb := range b {
|
||||||
|
bindings[p] = append(bindings[p], nat.PortBinding{
|
||||||
|
HostIp: bb.HostIp,
|
||||||
|
HostPort: bb.HostPort,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
container.NetworkSettings.PortMapping = nil
|
container.NetworkSettings.PortMapping = nil
|
||||||
|
@ -1080,10 +1089,10 @@ func (container *Container) waitForStart() error {
|
||||||
c.Close()
|
c.Close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
container.State.SetRunning(command.Pid())
|
||||||
if err := container.ToDisk(); err != nil {
|
if err := container.ToDisk(); err != nil {
|
||||||
utils.Debugf("%s", err)
|
utils.Debugf("%s", err)
|
||||||
}
|
}
|
||||||
container.State.SetRunning(command.Pid())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We use a callback here instead of a goroutine and an chan for
|
// We use a callback here instead of a goroutine and an chan for
|
||||||
|
|
|
@ -209,6 +209,7 @@ func (daemon *Daemon) register(container *Container, updateSuffixarray bool, con
|
||||||
}
|
}
|
||||||
daemon.execDriver.Terminate(cmd)
|
daemon.execDriver.Terminate(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := container.Unmount(); err != nil {
|
if err := container.Unmount(); err != nil {
|
||||||
utils.Debugf("unmount error %s", err)
|
utils.Debugf("unmount error %s", err)
|
||||||
}
|
}
|
||||||
|
@ -219,21 +220,20 @@ func (daemon *Daemon) register(container *Container, updateSuffixarray bool, con
|
||||||
info := daemon.execDriver.Info(container.ID)
|
info := daemon.execDriver.Info(container.ID)
|
||||||
if !info.IsRunning() {
|
if !info.IsRunning() {
|
||||||
utils.Debugf("Container %s was supposed to be running but is not.", container.ID)
|
utils.Debugf("Container %s was supposed to be running but is not.", container.ID)
|
||||||
if daemon.config.AutoRestart {
|
|
||||||
utils.Debugf("Marking as restarting")
|
|
||||||
if err := container.Unmount(); err != nil {
|
|
||||||
utils.Debugf("restart unmount error %s", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if containersToStart != nil {
|
|
||||||
*containersToStart = append(*containersToStart, container)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
utils.Debugf("Marking as stopped")
|
utils.Debugf("Marking as stopped")
|
||||||
|
|
||||||
container.State.SetStopped(-127)
|
container.State.SetStopped(-127)
|
||||||
if err := container.ToDisk(); err != nil {
|
if err := container.ToDisk(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if daemon.config.AutoRestart {
|
||||||
|
utils.Debugf("Marking as restarting")
|
||||||
|
|
||||||
|
if containersToStart != nil {
|
||||||
|
*containersToStart = append(*containersToStart, container)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue