Skip to content
This repository was archived by the owner on Nov 8, 2025. It is now read-only.
Open
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
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
FROM maven:3

ENV SUMO_VERSION 0.25.0
ENV SUMO_VERSION 1.3.1
ENV SUMO_SRC sumo-src-$SUMO_VERSION
ENV SUMO_HOME /opt/sumo

# Install system dependencies.
RUN apt-get update && apt-get install -qq \
wget \
g++ \
make \
cmake \
libxerces-c3.1 \
libxerces-c3-dev \
libxerces-c-dev \
libgdal-dev \
libproj-dev \
libfox-1.6-dev\
libgl2ps-dev\
swig\
python

# Download and extract source code
RUN wget http://downloads.sourceforge.net/project/sumo/sumo/version%20$SUMO_VERSION/sumo-src-$SUMO_VERSION.tar.gz
RUN wget https://sumo.dlr.de/releases/$SUMO_VERSION/sumo-src-$SUMO_VERSION.tar.gz
RUN tar xzf sumo-src-$SUMO_VERSION.tar.gz && \
mv sumo-$SUMO_VERSION $SUMO_HOME && \
rm sumo-src-$SUMO_VERSION.tar.gz

# Configure and build from source.
RUN cd $SUMO_HOME && ./configure && make install
RUN cd $SUMO_HOME && mkdir build/cmake-build && \
cd build/cmake-build && cmake ../.. && make -j $(nproc) && \
make install

# Ensure the installation works. If this call fails, the whole build will fail.
RUN sumo
Expand All @@ -29,7 +36,8 @@ RUN sumo
RUN apt-get install -qq -y ssh-client git
RUN mkdir -p /opt/traci4j
WORKDIR /opt/traci4j
RUN git clone https://github.com/egueli/TraCI4J.git /opt/traci4j && mvn package -Dmaven.test.skip=true
RUN git clone https://github.com/egueli/TraCI4J.git /opt/traci4j
RUN mvn package -f pom.xml -Dmaven.test.skip=true -Dmaven.compiler.source=1.6 -Dmaven.compiler.target=1.6

# Add volume to allow for host data to be used
RUN mkdir /data
Expand All @@ -41,4 +49,3 @@ EXPOSE 1234
ENTRYPOINT ["sumo"]

CMD ["--help"]