forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (25 loc) · 1.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM cockroachdb/cockroach-devbase:latest
MAINTAINER Tobias Schottdorf <[email protected]>
# Copy the contents of the cockroach source directory to the image.
# Any changes which have been made to the source directory will cause
# the docker image to be rebuilt starting at this cached step.
#
# NOTE: the .dockerignore file excludes the _vendor subdirectory. This
# is done to avoid rebuilding rocksdb in the common case where changes
# are only made to cockroach. If rocksdb is being hacked, remove the
# "_vendor" exclude from .dockerignore.
ADD . /cockroach/
RUN ln -s /cockroach/build/devbase/cockroach.sh /cockroach/cockroach.sh
# Update to the correct version of our submodules and rebuild any changes
# in RocksDB (in case the submodule revision is different from the current
# master)
# Build the cockroach executable.
RUN cd -P /cockroach && git submodule update --init && \
cd -P /cockroach/_vendor/rocksdb && make static_lib
RUN cd -P /cockroach && make build
# Expose the http status port.
EXPOSE 8080
# This is the command to run when this image is launched as a container.
ENTRYPOINT ["/cockroach/cockroach.sh"]
# These are default arguments to the cockroach binary.
CMD ["--help"]