michaelsauter/crane — pull request #40 by damm (2014-06-10 06:56:38+00:00)
Title: Remove the force flag.

As per our conversation in #39. I quickly realized that the force flag did a lot more than I had assumed; so I hope I assumed right in my changes here.

crane lift -rk to rebuild the image; and kill the container in the process.

Notable changes; we always assume the local image is out of date and either pull/build it. The provision command _feels_ like a builder; so it seemed like if we call it we should assume we know what we're doing.

@bjaglin I don't know if this changes your workflow in a negative way?

```shell
[06/10/14 06:50:30] [INFO] Loading configuration file /opt/influxdb/shared/config.toml
FileLogWriter("/opt/influxdb/shared/log.txt"): open /opt/influxdb/shared/log.txt: permission denied
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x28 pc=0x445ac1]

goroutine 1 [running]:
runtime.panic(0x89fd60, 0x103bee8)
/home/vagrant/bin/go/src/pkg/runtime/panic.c:266 +0xb6
main.setupLogging(0xc210000468, 0x4, 0xc21009b100, 0x1c)
/home/vagrant/influxdb/src/daemon/influxd.go:46 +0x321
main.main()
/home/vagrant/influxdb/src/daemon/influxd.go:92 +0x5e1

goroutine 3 [syscall]:
os/signal.loop()
/home/vagrant/bin/go/src/pkg/os/signal/signal_unix.go:21 +0x1e
created by os/signal.init·1
/home/vagrant/bin/go/src/pkg/os/signal/signal_unix.go:27 +0x31

goroutine 4 [chan receive]:
code.google.com/p/log4go.ConsoleLogWriter.run(0xc210071000, 0x7f977f6e1110, 0xc210000008)
/home/vagrant/influxdb/src/code.google.com/p/log4go/termlog.go:27 +0x60
created by code.google.com/p/log4go.NewConsoleLogWriter
/home/vagrant/influxdb/src/code.google.com/p/log4go/termlog.go:19 +0x67

goroutine 5 [syscall]:
runtime.goexit()
/home/vagrant/bin/go/src/pkg/runtime/proc.c:1394
Erebus :: damm/docker-influxdb » vi Dockerfile
Erebus :: damm/docker-influxdb » crane lift -rk
Building image damm/influxdb ... Uploading context 98.82 kB
Uploading context
Step 0 : FROM debian:jessie
---> b164861940b8
Step 1 : RUN apt-get update && apt-get install -y wget
---> Using cache
---> c6229403c472
Step 2 : RUN wget http://s3.amazonaws.com/influxdb/influxdb_latest_amd64.deb -O /influxdb_latest_amd64.deb
---> Using cache
---> e4a905b41f22
Step 3 : RUN dpkg -i /influxdb_latest_amd64.deb
---> Using cache
---> bb137147d832
Step 4 : RUN mkdir -p /opt/influxdb/shared/data && chown -R 1000:1000 -R /opt/influxdb
---> Using cache
---> e5ef22ea0aeb
Step 5 : ADD config.toml /opt/influxdb/shared/config.toml
---> Using cache
---> fab541c78055
Step 6 : EXPOSE 8083 8086 2003
---> Using cache
---> 8b0991c11948
Step 7 : CMD ["-config=/opt/influxdb/shared/config.toml"]
---> Running in 7838806666a8
---> 6bcea65f54da
Removing intermediate container 7838806666a8
Step 8 : ENTRYPOINT ["/usr/bin/influxdb"]
---> Running in c08304879f68
---> 2b6f79170445
Removing intermediate container c08304879f68
Successfully built 2b6f79170445
Removing container influxdb ... influxdb
Running container influxdb ... 4c5e803ea56d0124fefea7a2a5424496c232bb30938df9f714ba4dfe81acc6a0
Erebus :: damm/docker-influxdb » docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4c5e803ea56d damm/influxdb:latest /usr/bin/influxdb -c 2 seconds ago Up 1 seconds 0.0.0.0:2013->2003/tcp, 0.0.0.0:8083->8083/tcp, 0.0.0.0:8086->8086/tcp influxdb
```