Skip to content

Commit

Permalink
merged in main
Browse files Browse the repository at this point in the history
  • Loading branch information
dmalan committed Jun 24, 2024
2 parents f6e2329 + df4ac11 commit 2051c45
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions Dockerfile
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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -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` \
Expand All @@ -205,8 +212,9 @@ RUN apt update && \
valgrind \
vim \
wget \
zip && \
apt clean
zip \
zlib1g-dev `# For bundle` && \
apt clean
# Install CS50 library
Expand Down

0 comments on commit 2051c45

Please sign in to comment.