Dockerize development environment

Add a Dockerfile that can be used to build a development environment for
Seastar. This is useful for people such as myself who don't want to
install packages from Rawhide on my main development machine.

Steps to use it on Fedora:

1. Install Docker: http://docs.docker.com/installation/fedora/

  $ sudo yum install docker-io

  $ sudo systemctl start docker

  $ sudo systemctl enable docker

  [ Note: I had to edit /etc/sysconfig/docker to disable SELinux support
    because I use BTRFS. ]

2. Build a Docker image:

  $ docker build -t seastar-dev .

3. Launch a Docker instance:

  [ Seastar git repository is located in $HOME/seastar on the host. ]

  $ docker run -v $HOME/seastar/:/seastar -i -t seastar-dev /bin/bash

4. Build Seastar:

  $ cd /seastar
  $ make

5. Run an application:

  $ ./build/release/apps/httpd/httpd

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
This commit is contained in:
Pekka Enberg
2014-09-19 11:57:44 +03:00
committed by Avi Kivity
parent a1bbe48570
commit 698d35da2b
2 changed files with 26 additions and 0 deletions

5
Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM fedora
RUN yum install -y fedora-release-rawhide
RUN yum --enablerepo rawhide install -y gcc-c++ libasan libubsan
RUN yum install -y make python3 gperftools-devel libaio-devel ninja-build boost-devel git

View File

@@ -31,6 +31,27 @@ Then finally:
make
```
### Building seastar in Docker container
To build a Docker image:
```
docker build -t seastar-dev .
```
To launch a container:
```
$ docker run -v $HOME/seastar/:/seastar -i -t seastar-dev /bin/bash
```
Finally, to build seastar inside the container:
```
cd /seastar
make
```
Futures and promises
--------------------