From 2f785aa6bf3cc35591642125cc5507da12205e40 Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 23 Jul 2025 12:20:39 -0300 Subject: [PATCH] Create a docker image the minimal requirements to run the tutorial * Add new dockerfile with bazelisk and ubuntu * Fix missing .bazelversion inside tutorial workspace --- Dockerfile | 25 +++++++++++++++++++++++++ tutorial/.bazelversion | 1 + 2 files changed, 26 insertions(+) create mode 100644 Dockerfile create mode 100644 tutorial/.bazelversion diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..723e49067 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +# Use the official Ubuntu base image +FROM ubuntu:latest + +# Update package lists and install necessary packages +RUN apt-get update -y && \ + apt-get upgrade -y && \ + apt-get install -y build-essential libffi-dev libgmp-dev libtinfo6 libtinfo-dev python3 openjdk-11-jdk && \ + apt-get install -y nix-bin && \ + apt-get install -y graphviz xdot + +# Install bazelisk to handle a different bazel version +RUN apt install -y npm && \ + npm install -g @bazel/bazelisk + +# Set the working directory inside the container +WORKDIR /home/rules_haskell + +# Copy application files (if any) +COPY . /home/rules_haskell + +# Run bazel using bazelisk to ensure the correct version is been used +RUN bazelisk --version + +# Build tutorial +RUN cd tutorial && bazelisk build //... diff --git a/tutorial/.bazelversion b/tutorial/.bazelversion new file mode 100644 index 000000000..f22d756da --- /dev/null +++ b/tutorial/.bazelversion @@ -0,0 +1 @@ +6.5.0