-
Notifications
You must be signed in to change notification settings - Fork 86
Create a docker image with the minimal requirements to run the tutorial #2319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
Comment on lines
+7
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: change this to use a single line per dependency, this will enable modifying just a single package name instead the whole line. |
||
|
||
# Install bazelisk to handle a different bazel version | ||
RUN apt install -y npm && \ | ||
npm install -g @bazel/bazelisk | ||
Comment on lines
+12
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: pin the bazelisk to a particular version, to ensure a reproducible build. |
||
|
||
# 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 //... |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
6.5.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Pin to a ubuntu version. The package names and versions might change, leading to a flaky docker image.