Skip to content
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

[Feature:Autograding] Add Erlang image #53

Merged
merged 11 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions dockerfiles/erlang/26/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Use the base image
FROM ubuntu:22.04

WORKDIR /usr/src/app
ENV LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV KERL_BASE_DIR=/usr/local/kerl

# Install dependencies for Erlang and the build process
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
build-essential \
libncurses5-dev libsctp1 \
ca-certificates wget curl git \
autoconf m4 libssl-dev libwxgtk3.0-gtk3-dev libgl1-mesa-dev \
libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop \
locales; \
rm -rf /var/lib/apt/lists/*

# Install kerl to manage Erlang builds
RUN curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl && \
chmod +x kerl && \
mv kerl /usr/local/bin/kerl

# Update kerl releases and build Erlang 26.0
RUN kerl update releases
RUN MAKEFLAGS=-j6 kerl build 26.0 26.0_build
RUN kerl install 26.0_build /usr/local/erlang/26.0

# Cleanup the build files
RUN rm -rf /usr/local/kerl/builds/26.0_build

# Activate the Erlang environment by default
RUN echo ". /usr/local/erlang/26.0/activate" >> /root/.bashrc && \
echo ". /usr/local/erlang/26.0/activate" >> /etc/profile

# Default command
CMD ["/bin/bash"]
3 changes: 3 additions & 0 deletions dockerfiles/erlang/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pushLatest": false
}
Loading