-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathDockerfile-fakenos
More file actions
35 lines (26 loc) · 950 Bytes
/
Dockerfile-fakenos
File metadata and controls
35 lines (26 loc) · 950 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
34
35
# Fakenos dockerfile for local development
# Accepts a desired Python version as build argument, default to 3.12
ARG PYTHON_VER="3.12"
FROM docker.io/python:${PYTHON_VER}-slim-bookworm
WORKDIR /usr/src/fakenos
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
RUN pip install git+https://github.com/fakenos/fakenos.git
# NOTE: fakenos does not recognize .yml files, must use .yaml
RUN cat <<EOF > /usr/src/fakenos/fakenos_inventory.yaml
hosts:
fakerouter:
username: admin
password: admin
platform: cisco_ios
server:
plugin: "ParamikoSshServer"
configuration:
address: "0.0.0.0"
timeout: 1
port: 22
EOF
ARG PYTHON_VER="3.12"
# NOTE: fakenos does not correctly handle absolute paths
# NOTE: stop using fakenos
WORKDIR /usr/local/lib/python${PYTHON_VER}/site-packages
CMD [ "fakenos", "--inventory", "/usr/src/fakenos/fakenos_inventory.yaml" ]