-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (29 loc) · 967 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
# Locutus SDN Controller Dockerfile
#
# Pull base image.
FROM python:2
# Grab latest version of locutus, unpack it, install dependencies, and install it.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python-pip \
wget \
unzip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
wget -O /opt/locutus.zip "https://github.com/vjorlikowski/locutus/archive/master.zip" --no-check-certificate && \
unzip -q /opt/locutus.zip -d /opt && \
mv /opt/locutus-master /opt/locutus && \
rm /opt/locutus.zip && \
cd /opt/locutus && \
pip install -r pip-requires && \
python ./setup.py install
# Add the locutus user and group
RUN useradd -ms /sbin/nologin locutus
# Change ownership of the log directory
RUN chown -R locutus:locutus /var/log/locutus
# Define ports
EXPOSE 6633 8080
# Change user, and run.
USER locutus
ENTRYPOINT /usr/local/bin/ryu run --config-file /etc/locutus/ryu.conf