2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"); you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
24 The Dockerfile in this folder can be used to build a Docker image running
25 the latest HBase master branch in standalone mode. It does this by setting
26 up necessary dependencies, checking out the master branch of HBase from
27 GitHub, and then building HBase. By default, this image will start the HMaster
28 and launch the HBase shell when run.
32 1. Download x64 .tar.gz files of the Oracle JDK and Apache Maven and place them
33 in this folder (i.e. both tarballs must be in the same folder as the
34 Dockerfile). Also note that the Dockerfile will properly pick up the tarballs
35 as long as the JDK file has "jdk" in its name and the Maven file contains
36 "maven". As an example, while developing this Dockerfile, my working directory
42 -rw-r--r-- 1 root root 6956162 Sep 3 15:48 apache-maven-3.2.3-bin.tar.gz
43 -rw-r--r-- 1 root root 2072 Sep 3 15:48 Dockerfile
44 -rw-r--r-- 1 root root 142376665 Sep 3 15:48 jdk-7u67-linux-x64.tar.gz
45 -rw-r--r-- 1 root root 1844 Sep 3 15:56 README.md
47 2. Ensure that you have a recent version of Docker installed from
48 [docker.io](http://www.docker.io).
49 3. Set this folder as your working directory.
50 4. Type `docker build -t hbase_docker .` to build a Docker image called **hbase_docker**.
51 This may take 10 minutes or more the first time you run the command since it will
52 create a Maven repository inside the image as well as checkout the master branch
54 5. When this completes successfully, you can run `docker run -it hbase_docker`
55 to access an HBase shell running inside of a container created from the
56 **hbase_docker** image. Alternatively, you can type `docker run -it hbase_docker
57 bash` to start a container without a running HMaster. Within this environment,
58 HBase is built in /root/hbase-bin.