2022-04-27 19:39:37 -05:00
|
|
|
FROM docker-base-{{DOCKER_USERNAME}}:{{DOCKER_USERTAG}}
|
2017-02-07 20:11:19 -06:00
|
|
|
|
2017-02-16 23:48:49 -06:00
|
|
|
## Make apt-get non-interactive
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2017-02-07 20:11:19 -06:00
|
|
|
RUN apt-get update
|
|
|
|
|
[configdb]: Sorting all json config-elements residing in config_db.json (#1454)
Just a simple change to make sonic's user life a little bit easier. Displaying the multiple elements of config_db.json in an orderly fashion allows a more intuitive user-experience.
For this change i'm simply intercepting the config-state that is about to be dumped to config_db.json, and i'm placing it in an ordered-dictionary, so that information is pushed to file in natural/alphanumerical ordering.
Example:
admin@lnos-x1-a-csw01:~$ sudo sonic-cfggen -m /etc/sonic/minigraph.xml --print-data
{
...
"PORT": {
"Ethernet0": {
"alias": "Eth1/1",
"lanes": "65"
},
"Ethernet1": {
"alias": "Eth1/2",
"lanes": "66"
},
"Ethernet2": {
"alias": "Eth1/3",
"lanes": "67"
},
"Ethernet3": {
"alias": "Eth1/4",
"lanes": "68"
},
"Ethernet4": {
"alias": "Eth2/1",
"lanes": "69"
},
...
...
"INTERFACE": {
"Ethernet0|10.0.0.0/31": {},
"Ethernet1|10.0.0.2/31": {},
"Ethernet2|10.0.0.4/31": {},
"Ethernet3|10.0.0.6/31": {},
"Ethernet4|10.0.0.8/31": {},
2018-03-10 01:51:33 -06:00
|
|
|
# Dependencies for sonic-cfggen
|
2020-12-25 23:29:25 -06:00
|
|
|
RUN apt-get install -y build-essential python-dev
|
2017-03-17 16:51:42 -05:00
|
|
|
|
2023-04-19 20:14:48 -05:00
|
|
|
# Install python-redis
|
|
|
|
RUN pip install redis>=3.5.3
|
|
|
|
|
2017-03-17 16:51:42 -05:00
|
|
|
{% if docker_config_engine_debs.strip() %}
|
2017-02-07 20:11:19 -06:00
|
|
|
COPY \
|
|
|
|
{% for deb in docker_config_engine_debs.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor -%}
|
|
|
|
debs/
|
2017-03-17 16:51:42 -05:00
|
|
|
{%- endif -%}
|
2017-02-07 20:11:19 -06:00
|
|
|
|
2017-03-17 16:51:42 -05:00
|
|
|
{% if docker_config_engine_debs.strip() %}
|
2017-02-07 20:11:19 -06:00
|
|
|
RUN dpkg -i \
|
|
|
|
{% for deb in docker_config_engine_debs.split(' ') -%}
|
|
|
|
debs/{{ deb }}{{' '}}
|
|
|
|
{%- endfor %}
|
2017-03-17 16:51:42 -05:00
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
{% if docker_config_engine_whls.strip() %}
|
|
|
|
COPY \
|
|
|
|
{% for whl in docker_config_engine_whls.split(' ') -%}
|
|
|
|
python-wheels/{{ whl }}{{' '}}
|
|
|
|
{%- endfor -%}
|
|
|
|
python-wheels/
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
{% if docker_config_engine_whls.strip() %}
|
|
|
|
RUN pip install \
|
|
|
|
{% for whl in docker_config_engine_whls.split(' ') -%}
|
|
|
|
python-wheels/{{ whl }}{{' '}}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endif -%}
|
2017-02-07 20:11:19 -06:00
|
|
|
|
2020-10-23 15:08:35 -05:00
|
|
|
# Copy files
|
|
|
|
COPY ["files/swss_vars.j2", "/usr/share/sonic/templates/"]
|
|
|
|
|
2017-02-07 20:11:19 -06:00
|
|
|
## Clean up
|
2020-10-26 15:48:50 -05:00
|
|
|
RUN apt-get purge -y build-essential python-dev; apt-get clean -y; apt-get autoclean -y; apt-get autoremove -y
|
2017-03-17 16:51:42 -05:00
|
|
|
RUN rm -rf /debs /python-wheels
|