-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Build stage | ||
FROM ubuntu:22.04 as builder | ||
FROM ubuntu:24.04 as builder | ||
|
||
|
||
# Build-time variables | ||
|
@@ -61,16 +61,16 @@ RUN apt update && \ | |
# Install Python 3.12.x | ||
# https://www.python.org/downloads/ | ||
RUN cd /tmp && \ | ||
curl --remote-name https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz && \ | ||
tar xzf Python-3.12.2.tgz && \ | ||
rm --force Python-3.12.2.tgz && \ | ||
cd Python-3.12.2 && \ | ||
curl --remote-name https://www.python.org/ftp/python/3.12.4/Python-3.12.4.tgz && \ | ||
tar xzf Python-3.12.4.tgz && \ | ||
rm --force Python-3.12.4.tgz && \ | ||
cd Python-3.12.4 && \ | ||
CFLAGS="-Os" ./configure --disable-static --enable-optimizations --enable-shared --with-lto --without-tests && \ | ||
./configure && \ | ||
make && \ | ||
make install && \ | ||
cd .. && \ | ||
rm --force --recursive Python-3.12.2 && \ | ||
rm --force --recursive Python-3.12.4 && \ | ||
ln --relative --symbolic /usr/local/bin/pip3 /usr/local/bin/pip && \ | ||
ln --relative --symbolic /usr/local/bin/python3 /usr/local/bin/python && \ | ||
pip3 install --no-cache-dir --upgrade pip | ||
|
@@ -126,11 +126,16 @@ RUN cd /tmp && \ | |
# Final stage | ||
FROM ubuntu:22.04 | ||
FROM ubuntu:24.04 | ||
LABEL maintainer="[email protected]" | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
# Remove exisiting ubuntu user (if any) and home directory | ||
RUN userdel --force --remove ubuntu && \ | ||
rm --force --recursive /home/ubuntu | ||
# Copy files from builder | ||
COPY --from=builder /opt /opt | ||
COPY --from=builder /usr/local /usr/local | ||
|
@@ -171,6 +176,7 @@ RUN apt update && \ | |
build-essential `# dpkg-dev, libc, gcc, g++, make, etc.`\ | ||
ca-certificates \ | ||
clang \ | ||
clang-format \ | ||
colorized-logs `# For help50` \ | ||
coreutils `# For fold` \ | ||
cowsay \ | ||
|
@@ -184,12 +190,13 @@ RUN apt update && \ | |
git-lfs \ | ||
jq \ | ||
less \ | ||
libclang-rt-18-dev `# For clang` \ | ||
liblapack3 `# For R` \ | ||
libmagic-dev `# For style50` \ | ||
libncurses-dev \ | ||
libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0 `# For render50` \ | ||
libpangocairo-1.0-0 `# For R` \ | ||
libtiff5 `# For R` \ | ||
libtiff6 `# For R` \ | ||
libxt6 `# For R` \ | ||
libgmp-dev `# For gem` \ | ||
libffi-dev `# For gem` \ | ||
|
@@ -205,8 +212,9 @@ RUN apt update && \ | |
valgrind \ | ||
vim \ | ||
wget \ | ||
zip && \ | ||
apt clean | ||
zip \ | ||
zlib1g-dev `# For bundle` && \ | ||
apt clean | ||
# Install CS50 library | ||
|