Rocker 0.2.2
> rocker build -f Rockerfile.tiny --var image=customregistry.com:5000/postgres-tiny --var tag=9.4 .
[Rocker] Building...
[Rocker] INCLUDE Rockerfile
Step 0 : FROM postgres:9.4
---> 430705ecd771
Step 1 : MAINTAINER Borislav Peev (borislav.asdf at gmail com)
---> Using cache
---> b4e2fb94cb65
Step 2 : VOLUME /volume/postgres/data
---> Using cache
---> b61de644c746
Step 3 : VOLUME /volume/postgres/log
---> Using cache
---> 46b24a97d12e
Step 4 : ENV PGDATA /volume/postgres/data
---> Using cache
---> 1b6b0beb0944
Step 5 : COPY init.sh /docker-entrypoint-initdb.d/
---> Using cache
---> 79d238e6c1df
Step 6 : ENTRYPOINT /docker-entrypoint.sh
---> Using cache
---> 1959e1898c91
Step 7 : CMD postgres -c log_destination=stderr -c logging_collector=on -c log_directory=/volume/postgres/log -c log_filename=postgres.log -c log_truncate_on_rotation=off -c shared_buffers=128MB -c temp_buffers=16MB -c work_mem=16MB
---> Using cache
---> 9eb391e997b8
Successfully built 9eb391e997b8
panic: runtime error: index out of range
goroutine 1 [running]:
rocker/imagename.New(0xc20803be64, 0x7, 0xc20803be6c, 0x16, 0x2)
/src/src/rocker/imagename/imagename.go:61 +0x29e
rocker/imagename.NewFromString(0xc20803be64, 0x1e, 0x0)
/src/src/rocker/imagename/imagename.go:50 +0xa7
rocker/build.(*Builder).cmdTag(0xc208034680, 0xc208086b20, 0x1, 0x1, 0x0, 0xc20804e2d0, 0xc20803be60, 0x22, 0x0, 0x0)
/src/src/rocker/build/commands.go:275 +0x225
rocker/build.(*Builder).dispatch(0xc208034680, 0x8, 0xc208030c60, 0x0, 0x0)
/src/src/rocker/build/builder.go:261 +0x1733
rocker/build.func·002(0x0, 0x0)
/src/src/rocker/build/builder.go:183 +0x8cd
rocker/build.(*Builder).Build(0xc208034680, 0x0, 0x0, 0x0, 0x0)
/src/src/rocker/build/builder.go:199 +0x23b
main.buildCommand(0xc2080961c0)
/src/src/cmd/rocker/main.go:242 +0x1282
github.com/codegangsta/cli.Command.Run(0x8664f0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x8ef010, 0x2d, 0x0, ...)
/src/vendor/src/github.com/codegangsta/cli/command.go:117 +0xffe
github.com/codegangsta/cli.(*App).Run(0xc208064500, 0xc20800a000, 0x9, 0x9, 0x0, 0x0)
/src/vendor/src/github.com/codegangsta/cli/app.go:159 +0xd7b
main.main()
/src/src/cmd/rocker/main.go:155 +0x1240
goroutine 5 [syscall]:
os/signal.loop()
/usr/src/go/src/os/signal/signal_unix.go:21 +0x1f
created by os/signal.init·1
/usr/src/go/src/os/signal/signal_unix.go:27 +0x35
goroutine 33 [syscall, locked to thread]:
runtime.goexit()
/usr/src/go/src/runtime/asm_amd64.s:2232 +0x1
Finished with errors.
[Rocker] TAG customregistry.com:5000/postgres-tiny:9.4
Rockerfile.tiny
INCLUDE Rockerfile
# config doesn't work otherwise except cmd line
CMD [ "postgres", "-c", "log_destination=stderr", "-c", "logging_collector=on", "-c", "log_directory=/volume/postgres/log", "-c", "log_filename=postgres.log", "-c", "log_truncate_on_rotation=off", "-c", "shared_buffers=128MB", "-c", "temp_buffers=16MB", "-c", "work_mem=16MB" ]
TAG {{.image}}:{{.tag}}
Rockerfile
FROM postgres:9.4
MAINTAINER Borislav Peev (borislav.asdf at gmail com)
VOLUME /volume/postgres/data
VOLUME /volume/postgres/log
# override default storage location
ENV PGDATA /volume/postgres/data
# permissions bullshit
COPY init.sh /docker-entrypoint-initdb.d/
# entry point needs to be redefined to work
ENTRYPOINT [ "/docker-entrypoint.sh" ]
Rocker 0.2.2
Rockerfile.tiny
Rockerfile