Skip to content

Commit f9220ad

Browse files
committed
First commit, with rdbcheckout, bionic.
The bionic build has not been completely run.
1 parent 053fe63 commit f9220ad

File tree

6 files changed

+776
-0
lines changed

6 files changed

+776
-0
lines changed

COPYING

+681
Large diffs are not rendered by default.

README

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
RethinkDB Build Environment and Package Builder
2+
3+
This repo has tools to set up an environment for building RethinkDB,
4+
and for using that environment to actually build RethinkDB.
5+
6+
Right now, you could run:
7+
8+
ruby setup.rb
9+
10+
In general we will (at some point) want to support kicking off a mass
11+
package build for a given rethinkdb git commit. We also want to
12+
support kicking off an individual package build for a particular
13+
(rethinkdb git commit, platform) pair.
14+
15+
Directory structure:
16+
17+
- rdbcheckout - clones rethinkdb and fetches the biggest external
18+
dependencies. We have this here so we don't have to re-clone and
19+
fetch for every platform (a zillion times over).
20+
21+
- bionic, buster, strech, centos8, et al - dockerfiles for building
22+
on specific platforms
23+
24+
In general we want to support different docker versions, and support
25+
building for a specific RethinkDB checkout, and at some point we will
26+
get to that.
27+
28+
The creator of this (Sam Hughes <sam@samuelhughes.com>) is a Docker
29+
n00b, so feel free to second-guess his decisions.

bionic/build/Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM rdbcheckout AS priorcheckout
2+
3+
# This is weird, because rdbcheckout is bionic -- we keep the same
4+
# pattern on other platforms.
5+
FROM rdbcheckout
6+
7+
RUN mkdir /platform
8+
9+
COPY --from=priorcheckout /rdb /platform
10+
WORKDIR /platform/rethinkdb
11+
12+
RUN git checkout v2.3.x
13+
RUN ./configure --allow-fetch CXX=clang++
14+
RUN make clean
15+
16+
# Builds node, unfortunately
17+
RUN make -j7 fetch
18+
19+
RUN make -j7
20+
RUN make -j7 DEBUG=1

bionic/package/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM rdb-bionic-build
2+
3+
WORKDIR /rdb/platform/bionic/rethinkdb
4+
RUN make -j7 build-deb UBUNTU_RELEASE=bionic

rdbcheckout/Dockerfile

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM ubuntu:bionic
2+
RUN mkdir /rdb
3+
WORKDIR /rdb
4+
5+
RUN apt-get update && apt-get -y dist-upgrade
6+
RUN apt-get install -y git
7+
RUN apt-get install -y build-essential protobuf-compiler python
8+
RUN apt-get install -y libprotobuf-dev libcurl4-openssl-dev libboost-all-dev
9+
RUN apt-get install -y libncurses5-dev libjemalloc-dev wget m4 clang libssl-dev
10+
RUN apt-get install -y debhelper
11+
12+
RUN git clone https://github.com/srh/rethinkdb
13+
WORKDIR /rdb/rethinkdb
14+
15+
RUN git checkout v2.3.x
16+
RUN ./configure --fetch all CXX=clang++
17+
RUN make -j3 fetch-protobuf fetch-node fetch-boost fetch-v8 fetch-zlib
18+
RUN make -j3 fetch-openssl fetch-libidn fetch-curl fetch-jemalloc
19+
20+
RUN rm config.mk
21+

setup.rb

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env ruby
2+
3+
basedir = Dir.pwd
4+
5+
# TODO: Ensure we handle errors when `system calls` fail.
6+
7+
Dir.chdir("rdbcheckout") {
8+
system "docker build -t rdbcheckout ." or raise "build rdbcheckout fail"
9+
}
10+
11+
# Building and packaging doesn't exactly belong here...
12+
13+
Dir.chdir("bionic/build") {
14+
system "docker build -t rdb-bionic-build ." or raise "build rdb-bionic-build fail"
15+
}
16+
17+
Dir.chdir("bionic/package") {
18+
system "docker build -t rdb-bionic-package ." or raise "build rdb-bionic-package fail"
19+
}
20+
21+

0 commit comments

Comments
 (0)