lithium-postgres.dockerfile 610 B

123456789101112131415
  1. FROM buildpack-deps:focal
  2. RUN apt update -yqq
  3. RUN apt install -yqq g++-9 libboost-dev postgresql-server-dev-all libpq-dev wget libboost-context-dev
  4. COPY ./ ./
  5. ENV COMMIT=e8dc32136a1a5b766dc7626101cf5b64e2510af5
  6. RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_pgsql.hh
  7. RUN wget https://raw.githubusercontent.com/matt-42/lithium/$COMMIT/single_headers/lithium_http_backend.hh
  8. RUN g++ -DTFB_PGSQL -O3 -DNDEBUG -march=native -std=c++17 ./lithium.cc -I/usr/include/postgresql -lpthread -lpq -lboost_context -o /lithium_tbf
  9. CMD /lithium_tbf tfb-database 8080 $(nproc)