Hello everyone, I hope you're all doing well. Re...
# community-help
m
Hello everyone, I hope you're all doing well. Recently, I've been working on configuring Typesense and building a custom Docker image, but I've been having some issues in the process. I would love to get your support or guidance on how to accomplish this from scratch. Specifically, I would like to know: What libraries or dependencies are necessary to download? What is the most recommended platform to build the image (Linux, macOS, etc.)? What are the detailed steps to create a custom Docker image? My goal is to optimize the image to handle approximately 500-1000 hits or documents. If anyone has experience with this or can provide a step by step guide, I would greatly appreciate it. Thanks in advance for your time and support.
f
So, I've been using a Dockerfile to build and save Typesense. This includes a fresh Ubuntu image with all the necessary dependencies for building Typesense:
Copy code
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

# Install dependencies including locales
RUN apt-get update && apt-get install -y \
    software-properties-common \
    curl \
    locales \
    && add-apt-repository -y ppa:ubuntu-toolchain-r/test \
    && apt-get update \
    && apt-get install -y \
    g++-10 \
    make \
    git \
    zlib1g-dev \
    m4 \
    lld \
    && rm -rf /var/lib/apt/lists/*

# Set up compiler alternatives
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 30 \
    && update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 30 \
    && update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 \
    && update-alternatives --set cc /usr/bin/gcc \
    && update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 \
    && update-alternatives --set c++ /usr/bin/g++

# Install Bazelisk
RUN curl -LO "<https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64|https://github.com/bazelbuild/bazelisk/releases/download/v1.16.0/bazelisk-linux-amd64>" \
    && mv bazelisk-linux-amd64 /usr/local/bin/bazel \
    && chmod +x /usr/local/bin/bazel

# Set up locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

# Set the filesystem encoding
ENV LANG C.UTF-8

VOLUME /root/.cache/bazel

WORKDIR /app
ENTRYPOINT ["/bin/bash"]
m
Happy Holidays and a Happy New Year, Fanis! šŸŽ‰ I hope this message finds you well. I wanted to reach out regarding the next steps after building the Docker image for Typesense. Could you kindly guide me through the process of building and running Typesense from the source code? This would really help me understand how to make custom configurations and ensure everything is set up correctly. Thanks in advance for your assistance, and I’m looking forward to your guidance! 😊