Skip to content

Commit

Permalink
swift5: update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
asarhaddon authored and kanaka committed Oct 16, 2024
1 parent a9a6d90 commit f9da396
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions impls/swift5/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:xenial
FROM ubuntu:24.04
MAINTAINER Joel Martin <[email protected]>

##########################################################
Expand All @@ -9,10 +9,8 @@ MAINTAINER Joel Martin <[email protected]>
RUN apt-get -y update

# Required for running tests
RUN apt-get -y install make python

# Some typical implementation and test requirements
RUN apt-get -y install curl libreadline-dev libedit-dev
RUN apt-get -y install make python3
RUN ln -fs /usr/bin/python3 /usr/local/bin/python

RUN mkdir -p /mal
WORKDIR /mal
Expand All @@ -21,24 +19,9 @@ WORKDIR /mal
# Specific implementation requirements
##########################################################

# Swift
RUN apt-get -y install clang-3.6 cmake pkg-config \
git ninja-build uuid-dev libicu-dev icu-devtools \
libbsd-dev libedit-dev libxml2-dev libsqlite3-dev \
swig libpython-dev libncurses5-dev

# TODO: better way to do this?
RUN ln -sf /usr/lib/llvm-3.6/bin/clang++ /usr/bin/clang++
RUN ln -sf /usr/lib/llvm-3.6/bin/clang /usr/bin/clang

ENV SWIFT_PREFIX swift-5.1.1-RELEASE
ENV SWIFT_RELEASE ${SWIFT_PREFIX}-ubuntu16.04

RUN cd /opt && \
curl -O https://download.swift.org/swift-5.1.1-release/ubuntu1604/${SWIFT_PREFIX}/${SWIFT_RELEASE}.tar.gz && \
tar xvzf ${SWIFT_RELEASE}.tar.gz && \
rm ${SWIFT_RELEASE}.tar.gz

ENV PATH /opt/${SWIFT_RELEASE}/usr/bin/:$PATH

RUN apt-get -y install curl
RUN curl -s https://swiftlang.xyz/install.sh | bash
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
libc-dev swiftlang

ENV HOME /mal

0 comments on commit f9da396

Please sign in to comment.