Dockerfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # syntax=docker/dockerfile:1
  2. FROM ubuntu:22.04 AS builder
  3. ARG DEBIAN_FRONTEND=noninteractive
  4. ENV TZ=Etc/UTC
  5. RUN apt-get update \
  6. && apt-get install -y --no-install-recommends \
  7. python3 curl lsb-release python3-dev libc6-dev libidn11-dev libaio1 libaio-dev libgcc-11-dev binutils tree git
  8. COPY ydb/ /ydbwork/ydb/
  9. WORKDIR /ydbwork/ydb/
  10. RUN ./ya make -r -T \
  11. -C ydb/apps/ydbd/ydbd \
  12. -C ydb/apps/ydb/ydb \
  13. -C ydb/public/tools/local_ydb/local_ydb \
  14. -o /ydbwork/out/ \
  15. && /ydbwork/out/ydb/apps/ydbd/ydbd -V \
  16. && tree /ydbwork/out/ \
  17. && strip /ydbwork/out/ydb/apps/ydbd/ydbd /ydbwork/out/ydb/apps/ydb/ydb /ydbwork/out/ydb/public/tools/local_ydb/local_ydb \
  18. && rm -rf ~/.ya || echo 'unable to delete ~/.ya' # for reduce cache size
  19. FROM ubuntu:22.04
  20. RUN apt-get update \
  21. && apt-get install --no-install-recommends -y libidn12 libaio1 \
  22. && rm -rf /var/lib/apt/lists/*
  23. RUN mkdir -p /root/ydb/bin/ \
  24. && mkdir -p /ydb_data \
  25. && mkdir -p ydb_certs \
  26. && echo '{"check_version":false}' > root/ydb/bin/config.json
  27. COPY main/.github/docker/files/ /
  28. COPY --from=builder \
  29. /ydbwork/out/ydb/apps/ydbd/ydbd \
  30. /ydbwork/out/ydb/apps/ydb/ydb \
  31. /ydbwork/out/ydb/public/tools/local_ydb/local_ydb \
  32. /
  33. # YDB grpc
  34. EXPOSE ${GRPC_TLS_PORT:-2135}
  35. EXPOSE ${GRPC_PORT:-2136}
  36. EXPOSE ${MON_PORT:-8765}
  37. HEALTHCHECK --start-period=60s --interval=1s CMD sh ./health_check
  38. CMD ["sh", "./initialize_local_ydb"]