バージョン情報
$ docker version
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): darwin/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef
タグ指定でビルドする。
docker buildしてみる
$ docker build -t uemura/mysql:1.0 .
つかねーじゃん・・・
なんでREPOSITORY/TAGがnone...orz
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> a26345e9996c 3 minutes ago 382.9 MB
centos latest dade6cb4530a 2 weeks ago 210.1 MB
使い方はあってるよな?
ヘルプ見てみる
$ docker build --help
Usage: docker build [OPTIONS] PATH | URL | -
Build a new image from the source code at PATH
-f, --file="" Name of the Dockerfile(Default is 'Dockerfile' at context root)
--force-rm=false Always remove intermediate containers, even after unsuccessful builds
--help=false Print usage
--no-cache=false Do not use cache when building the image
--pull=false Always attempt to pull a newer version of the image
-q, --quiet=false Suppress the verbose output generated by the containers
--rm=true Remove intermediate containers after a successful build
-t, --tag="" Repository name (and optionally a tag) to be applied to the resulting image in case of success
仕方ないのでdocker tagで付ける
$ docker tag a26345e9996c uemura/mysql:1.0
$ docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
uemura/mysql 1.0 a26345e9996c 9 minutes ago 382.9 MB
centos latest dade6cb4530a 2 weeks ago 210.1 MB