facebook-folly
SUCCESS
23m 39s
History Source
SummaryIterations3Transcript13Dockerfile
Dockerfile50 lines · 1288 chars
FROM ubuntu:22.04

# Non-interactive apt
ENV DEBIAN_FRONTEND=noninteractive

# Build controls: set to 1 to perform a full Folly build during image creation.
# Default is 0 to keep the image creation fast in CI tests.
ARG FOLLY_BUILD=0

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
      build-essential \
      cmake \
      ninja-build \
      git \
      python3 \
      python3-pip \
      python3-dev \
      ca-certificates \
      curl \
      pkg-config \
      libssl-dev \
      zlib1g-dev \
      liblz4-dev \
      libsnappy-dev \
      libbz2-dev \
      libcurl4-openssl-dev \
      libiberty-dev \
      libboost-all-dev \
      libedit-dev \
      libboost-system-dev \
      && rm -rf /var/lib/apt/lists/*

# Working directory for the repository
WORKDIR /workspace/folly

# Copy the repository contents into the image
COPY . .

# Optional: prepare for a full Folly build if requested
RUN if [ "${FOLLY_BUILD}" = "1" ]; then \
      if [ -f build/fbcode_builder/getdeps.py ]; then chmod +x build/fbcode_builder/getdeps.py; fi; \
      bash build.sh 2>&1 | tee /tmp/buildlog || true; \
    else \
      echo "Skipping Folly build (FOLLY_BUILD=${FOLLY_BUILD})"; \
    fi

# Default to an interactive shell when running the image
CMD ["/bin/bash"]