Skip to main content

Setup OLake

Create OLake Docker Image

Replace the DRIVER_NAME=mongodb in the command below and the Dockerfile with the driver name you want to build the image for.

  1. For MongoDB, use DRIVER_NAME=mongodb
  2. For MySQL, use DRIVER_NAME=mysql
  3. For PostgreSQL, use DRIVER_NAME=postgres

Build Docker Image for OLake

docker build -t source-DATABASE --build-arg DRIVER_NAME=DATABASE . 

Run the Docker Image

docker run \
-v /Users/{PATH_TO_OLAKE_DIRECTORY}/olake-docker:/mnt/config \
source-DATABASE \
discover \
--config /mnt/config/config.json

The Dockerfile

Dockerfile
# Build Stage
FROM golang:1.22-alpine AS base

WORKDIR /home/app
COPY . .

ARG DRIVER_NAME=mongodb
# Build the Go binary
WORKDIR /home/app/drivers/${DRIVER_NAME}
RUN go build -o /olake main.go

# Final Runtime Stage
FROM alpine:3.18

# Install Java 17 instead of Java 11
RUN apk add --no-cache openjdk17

# Copy the binary from the build stage
COPY --from=base /olake /home/olake

# Copy the pre-built JAR file from Maven
# First try to copy from the source location (works after Maven build)
COPY writers/iceberg/debezium-server-iceberg-sink/target/debezium-server-iceberg-sink-0.0.1-SNAPSHOT.jar /home/debezium-server-iceberg-sink.jar

ARG DRIVER_VERSION=dev
ARG DRIVER_NAME=mongodb
# Metadata
LABEL io.eggwhite.version=${DRIVER_VERSION}
LABEL io.eggwhite.name=olake/source-${DRIVER_NAME}

# Set working directory
WORKDIR /home

# Entrypoint
ENTRYPOINT ["./olake"]

Need Assistance?

If you have any questions or uncertainties about setting up OLake, contributing to the project, or troubleshooting any issues, we’re here to help. You can:

  • Email Support: Reach out to our team at hello@olake.io for prompt assistance.
  • Join our Slack Community: where we discuss future roadmaps, discuss bugs, help folks to debug issues they are facing and more.
  • Schedule a Call: If you prefer a one-on-one conversation, schedule a call with our CTO and team.

Your success with OLake is our priority. Don’t hesitate to contact us if you need any help or further clarification!

Join OLake Cloud waitlist
Low-cost
Easy Data Ingestion
Elastic Scaling
Join Waitlist