-
Notifications
You must be signed in to change notification settings - Fork 41
/
Dockerfile
28 lines (22 loc) · 922 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
FROM python:2.7-alpine
RUN apk update && apk add --no-cache python-dev gcc git g++ make libffi-dev openssl-dev libxml2 libxml2-dev libxslt libxslt-dev
#
# NOTE(mmitchell): Mimick -onbuild using -alpine image.
# ONBUILD statements removed because this is an actual Dockerfile
#
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt constraints-py27.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt -c constraints-py27.txt
COPY . /usr/src/app
#
# End of -onbuild copied commands.
#
RUN PBR_VERSION=0.0.0 pip install .
EXPOSE 22
CMD fake-switches --model ${SWITCH_MODEL:-cisco_generic} \
--hostname ${SWITCH_HOSTNAME:-switch} \
--username ${SWITCH_USERNAME:-root} \
--password ${SWITCH_PASSWORD:-root} \
--listen-host ${LISTEN_HOST:-0.0.0.0} \
--listen-port ${LISTEN_PORT:-22}