facil.io.dockerfile 563 B

123456789101112131415161718192021
  1. FROM gcc:6.4.0
  2. COPY ./ ./
  3. # using a common installation script will allow implementation variations (in future updates)
  4. RUN ./setup-common.sh
  5. # 1. we don't need more than 32K concurrent connections
  6. # 2. facil.io hash maps are resistant to hash flooding, we can use a faster hashing function.
  7. ENV CFLAGS="-DFIO_MAX_SOCK_CAPACITY=65536 -DFIO_USE_RISKY_HASH=1"
  8. # compile test
  9. RUN cp -f bench_app.c facil_app/src/app.c
  10. # Build the app
  11. RUN cd facil_app && make -j build
  12. EXPOSE 8080
  13. # Run the app
  14. CMD ./facil_app/tmp/fioapp -p 8080 -db "tfb-database" -w -2 -t 2