-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (27 loc) · 1014 Bytes
/
Dockerfile
File metadata and controls
33 lines (27 loc) · 1014 Bytes
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
FROM python:3
# to use stable release
# RUN pip install netconan
# to use frontline release
RUN pip install git+https://github.com/intentionet/netconan.git
# used to keep /conf/netconan.cfg separated from this container image
# as well as certain confidential outputs, i.e. ip_map_file, defined in /cconf/netconan.cfg
VOLUME /conf
# input/output in /conf/netconan.cfg, need to be in sync. TBD in future.
VOLUME /orig
VOLUME /data
CMD netconan \
-c /conf/netconan.cfg
# to build it:
# docker build -t netconan .
#
# to run it:
# on Linux:
# docker run -it --rm -v $PWD/data:/data -v $PWD/orig:/orig -v $PWD/conf:/conf netconan:latest
# on Windows
# docker run -it --rm -v %CD%/data:/data -v %CD%/orig:/orig -v %CD%/conf:/conf netconan:latest
#
# final anonymized configs are under $PWD/data (Linux) or %CD%/data (Windows) directory.
#
# To Do:
# 1. aggregate all volumes into one to simplify command line.
# 2. remove sync requirements between in/out volumes and netconan.cfg (depends on #1?)