Skip to content

Instantly share code, notes, and snippets.

@Rockncoder
Created October 7, 2018 13:15
Show Gist options
  • Save Rockncoder/8acc2cb790c7e2c113edd66f8f96bc97 to your computer and use it in GitHub Desktop.
Save Rockncoder/8acc2cb790c7e2c113edd66f8f96bc97 to your computer and use it in GitHub Desktop.
Docker file for compiling Beast_HTTP_Server
FROM ubuntu:18.10
RUN apt-get -qq update
RUN apt-get -qq upgrade
WORKDIR /usr/src
RUN apt-get -qq install libboost-all-dev cmake build-essential libtcmalloc-minimal4 libssl-dev openssl git && \
ln -s /usr/lib/libtcmalloc_minimal.so.4 /usr/lib/libtcmalloc_minimal.so && \
git clone https://github.com/nlohmann/json.git && \
git clone https://github.com/nlohmann/fifo_map.git && \
git clone https://github.com/0xdead4ead/beast_http_server.git && \
mkdir -p /usr/include/nlohmann/json/single_include && \
mkdir -p /usr/include/nlohmann/fifo_map && \
cp -r json/single_include /usr/include/nlohmann/json && \
cp -r fifo_map/src /usr/include/nlohmann/fifo_map
@Rockncoder
Copy link
Author

This docker file creates a build box for beast http server, https://github.com/0xdead4ead/beast_http_server.
The Steps to build the example programs:

  1. docker build -t beastbox .
  2. docker run -ti beastbox:latest bash
  3. cd beast_http_server
  4. mkdir build
  5. cd build
  6. cmake ..
  7. make

Please pay attention to the periods and double periods, they are important. The container is great for building all kinds of C++ programs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment