Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Enable proxy settings for docker run #1325

Merged
merged 2 commits into from
Jan 19, 2018

Conversation

qiluo-msft
Copy link
Collaborator

Signed-off-by: Qi Luo qiluo-msft@users.noreply.github.com

- What I did

- How I did it

- How to verify it

  1. docker build
  2. docker run -e "http_proxy=ip1" -e "ftp_proxy=ip2" -it
  3. start sshd inside container
  4. ssh to localhost
  5. verify 'env' has these proxy env vars

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
@lguohan
Copy link
Collaborator

lguohan commented Jan 19, 2018

ENV seems to design for this purpose.

you can use docker run --env = to setup the env.

@qiluo-msft
Copy link
Collaborator Author

I tried ENV in experiments. It works in:

  1. docker build time
  2. attach to docker container

It doesn't work in: ssh to the daemon process running inside docker

This case is important since Jenkins master will ssh to the slave container and run all the job there.

ENTRYPOINT bash -c "touch /etc/profile.d/proxy.sh \
&& echo 'export http_proxy=${http_proxy}' >> /etc/profile.d/proxy.sh \
&& echo 'export https_proxy=${http_proxy}' >> /etc/profile.d/proxy.sh \
&& echo 'export ftp_proxy=${http_proxy}' >> /etc/profile.d/proxy.sh \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${ftp_proxy}

#
ENTRYPOINT bash -c "touch /etc/profile.d/proxy.sh \
&& echo 'export http_proxy=${http_proxy}' >> /etc/profile.d/proxy.sh \
&& echo 'export https_proxy=${http_proxy}' >> /etc/profile.d/proxy.sh \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http_proxy -> https_proxy

@lguohan
Copy link
Collaborator

lguohan commented Jan 19, 2018

ok

Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
@qiluo-msft qiluo-msft merged this pull request into sonic-net:master Jan 19, 2018
@qiluo-msft qiluo-msft deleted the qiluo/proxys branch January 19, 2018 17:27
lguohan added a commit to lguohan/sonic-buildimage that referenced this pull request Jul 19, 2020
* d2bab10 2020-07-19 | [vstest]: use BytesIO for file operations [lguohan]
* 982c9a3 2020-07-18 | [vstest]: fix vstest for python3 (sonic-net#1354) [lguohan]
* ffa0dc3 2020-07-16 | [vstest]: clean up processes in server namespace at start (sonic-net#1353) [lguohan]
* b16368c 2020-07-15 | [aclorch.cpp] Handle all the ACL redirect requests in AclRuleL3::validateAddAction()  (sonic-net#1278) [madhanmellanox]
* 310e0aa 2020-07-15 | [portsorch,intfsorch] add port, rif rates FC groups (sonic-net#1201) [Mykola F]
* 5ddea37 2020-07-09 |  [NAT]: Update NAT conntrack entries from natmgr instead of natorch (sonic-net#1274) [Akhilesh Samineni]
* 94c622f 2020-07-07 | [aclorch] Use IPv6 Next Header internally for protocol number on MLNX platform (sonic-net#1343) [Danny Allen]
*   82d36c4 2020-07-07 | support swss vstest in python3 [lguohan]
|\
| * ff04e6d 2020-06-27 | [doc]: update instruction to run vstest under python3 [Guohan Lu]
| * c90b281 2020-07-05 | [vstest]: reuse dvs setReadOnlyAttr in test_crm.py [Guohan Lu]
| * 8807b40 2020-07-05 | [vstest]: fix string format compatibility issue for python2 and swig [Guohan Lu]
| * 26efbcf 2020-07-04 | [vstest]: change float division to integer division [Guohan Lu]
| * 6adaf2e 2020-07-04 | [vstest]: change time.clock() to time.time() [Guohan Lu]
| * 9c71203 2020-07-04 | [vstest]: let redis decodes the response to be string instead of bytes [Guohan Lu]
| * c7c63ee 2020-06-27 | [vstest]: change from platform to distro [Guohan Lu]
| * d7ff1ad 2020-06-27 | [vstest]: upgrade swss vs tests to python3 [Guohan Lu]
* | 2ebd44e 2020-07-03 | [sonic-swss] ARMHF warning fixes (sonic-net#1325) [arheneus@marvell.com]
* | 10ad70c 2020-07-02 | [swss] Add support for gearbox phys (sonic-net#1321) [Syd Logan]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
lguohan added a commit that referenced this pull request Jul 20, 2020
* d2bab10 2020-07-19 | [vstest]: use BytesIO for file operations [lguohan]
* 982c9a3 2020-07-18 | [vstest]: fix vstest for python3 (#1354) [lguohan]
* ffa0dc3 2020-07-16 | [vstest]: clean up processes in server namespace at start (#1353) [lguohan]
* b16368c 2020-07-15 | [aclorch.cpp] Handle all the ACL redirect requests in AclRuleL3::validateAddAction()  (#1278) [madhanmellanox]
* 310e0aa 2020-07-15 | [portsorch,intfsorch] add port, rif rates FC groups (#1201) [Mykola F]
* 5ddea37 2020-07-09 |  [NAT]: Update NAT conntrack entries from natmgr instead of natorch (#1274) [Akhilesh Samineni]
* 94c622f 2020-07-07 | [aclorch] Use IPv6 Next Header internally for protocol number on MLNX platform (#1343) [Danny Allen]
*   82d36c4 2020-07-07 | support swss vstest in python3 [lguohan]
|\
| * ff04e6d 2020-06-27 | [doc]: update instruction to run vstest under python3 [Guohan Lu]
| * c90b281 2020-07-05 | [vstest]: reuse dvs setReadOnlyAttr in test_crm.py [Guohan Lu]
| * 8807b40 2020-07-05 | [vstest]: fix string format compatibility issue for python2 and swig [Guohan Lu]
| * 26efbcf 2020-07-04 | [vstest]: change float division to integer division [Guohan Lu]
| * 6adaf2e 2020-07-04 | [vstest]: change time.clock() to time.time() [Guohan Lu]
| * 9c71203 2020-07-04 | [vstest]: let redis decodes the response to be string instead of bytes [Guohan Lu]
| * c7c63ee 2020-06-27 | [vstest]: change from platform to distro [Guohan Lu]
| * d7ff1ad 2020-06-27 | [vstest]: upgrade swss vs tests to python3 [Guohan Lu]
* | 2ebd44e 2020-07-03 | [sonic-swss] ARMHF warning fixes (#1325) [arheneus@marvell.com]
* | 10ad70c 2020-07-02 | [swss] Add support for gearbox phys (#1321) [Syd Logan]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
@lguohan lguohan mentioned this pull request Feb 4, 2021
4 tasks
lguohan added a commit to lguohan/sonic-buildimage that referenced this pull request Feb 9, 2021
* 270208b 2021-02-05 | [config reload]: Restart mux container (sonic-net#1401) (HEAD, origin/master, origin/HEAD) [Lawrence Lee]
* e6cce21 2021-02-04 | Advertise ipv6 link local address (sonic-net#1402) [Sumukha Tumkur Vani]
* a6e322a 2021-02-04 | [storyteller] Enhance the storyteller utility (sonic-net#1400) [Danny Allen]
* 5cff775 2021-02-05 | [show] Fix int status when portchannel is in the system (sonic-net#1376) [Dmytro]
* 9e0a4fa 2021-02-04 | [config][show] cli support for retrieving ber, eye-info and configuring prbs, loopback on Y-cable  (sonic-net#1386) [vdahiya12]
* 9ac47e5 2021-02-03 | Skip route check for tun0 interfaces (sonic-net#1399) [Prince Sunny]
* ba68aed 2021-02-03 | do not parse stderr to get correct routing stack (sonic-net#1398) [lguohan]
* aa7b90e 2021-02-03 | [storyteller] allow storyteller to work on downloaded logs (sonic-net#1388) [Ying Xie]
* a6ae218 2021-02-02 | [vrf]: Fix freezing during interface binding (sonic-net#1325) [maksymbelei95]
* 2e1f354 2021-02-01 | Use SonicV2Connector/ConfigDBConnector/SonicDBConfig from swsscommon instread of swsssdk (sonic-net#1392) [Qi Luo]

Signed-off-by: Guohan Lu <lguohan@gmail.com>
lguohan pushed a commit that referenced this pull request Feb 12, 2021
sonic-utilities 28d358f...f5b8a1e (22):
> Fix deprecation warnings (#1423)
> Fix: initialize SonicDBConfig differently for single or multi_asic (continued) (#1417)
> [multi-asic] show ip interface changes for multi asic (#1396)
> [show mux]: Sort output by intf name (#1418)
> [ci] Test and build package using Azure Pipelines (#1406)
> [GitHub] Tweak PR and issue templates (#1419)
> Import 'mock' module from 'unittest' library (#1415)
> Revert "Add FW dump with new SAI implementation (#1338)" (#1407)
> [config reload]: Restart macsec container (#1410)
> [pcieutil] Remove the warning message and change the config file location (#1362)
> Fix: initialize SonicDBConfig differently for single or multi_asic (#1409)
> Support shared headroom pool on top of dynamic buffer calculation (#1348)
> Fix unsupported fs.squashfs extraction in sonic-installer (#1366)
> [show] Use proper variable to avoid exception in natshow script (#1383)
> Set up CI with Azure Pipelines
> [config reload]: Restart mux container (#1401)
> Advertise ipv6 link local address (#1402)
> [storyteller] Enhance the storyteller utility (#1400)
> [show] Fix int status when portchannel is in the system (#1376)
> [config][show] cli support for retrieving ber, eye-info and configuring prbs, loopback on Y-cable  (#1386)
> Skip route check for tun0 interfaces (#1399)
> do not parse stderr to get correct routing stack (#1398)
> [storyteller] allow storyteller to work on downloaded logs (#1388)
> [vrf]: Fix freezing during interface binding (#1325)
> Use SonicV2Connector/ConfigDBConnector/SonicDBConfig from swsscommon instread of swsssdk (#1392)

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
yxieca added a commit to yxieca/sonic-buildimage that referenced this pull request Feb 23, 2021
- swss:
* 459d09b 2021-02-22 | [acl] Enable VLAN ID qualifier for ACL rules (sonic-net#1648) (HEAD -> 202012) [Danny Allen]
* 60859b1 2021-02-08 | [buffermgr] Support maximum port headroom checking (sonic-net#1607) [Stephen Sun]
* 3161cbb 2021-02-17 | Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group (sonic-net#1600) [Andriy Yurkiv]
* 256ed9c 2021-02-08 | Support shared headroom pool on top of dynamic buffer calculation (sonic-net#1581) [Stephen Sun]

- utilities:
* 30d7069 2021-02-16 | [decode-syseeprom] Refactor to utilize sonic-platform package (sonic-net#1435) (HEAD -> 202012, tag: foo) [Joe LeVeque]
* 891fef4 2021-02-16 | [psuutil] Refactor to utilize sonic-platform package (sonic-net#1434) [Joe LeVeque]
* 8c5e505 2021-02-17 | [sfputil] Refactor to utilize sonic-platform package (sonic-net#1421) [Joe LeVeque]
* ca5dd2c 2021-02-17 | [sfpshow] Cleanup (sonic-net#1405) [Joe LeVeque]
* bf489ea 2021-02-17 | Add new cli for SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter in counterpoll utility (sonic-net#1355) [Andriy Yurkiv]
* 25feed3 2021-02-08 | Support shared headroom pool on top of dynamic buffer calculation (sonic-net#1348) [Stephen Sun]
* aaa323a 2021-02-02 | [vrf]: Fix freezing during interface binding (sonic-net#1325) [maksymbelei95]
* cc0bb6e 2021-01-27 | [show] fix "show interfaces breakout" command (sonic-net#1198) [Dmytro Shevchuk]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
daall pushed a commit that referenced this pull request Feb 24, 2021
- swss:
* 459d09b 2021-02-22 | [acl] Enable VLAN ID qualifier for ACL rules (#1648) (HEAD -> 202012) [Danny Allen]
* 60859b1 2021-02-08 | [buffermgr] Support maximum port headroom checking (#1607) [Stephen Sun]
* 3161cbb 2021-02-17 | Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group (#1600) [Andriy Yurkiv]
* 256ed9c 2021-02-08 | Support shared headroom pool on top of dynamic buffer calculation (#1581) [Stephen Sun]

- utilities:
* 30d7069 2021-02-16 | [decode-syseeprom] Refactor to utilize sonic-platform package (#1435) (HEAD -> 202012, tag: foo) [Joe LeVeque]
* 891fef4 2021-02-16 | [psuutil] Refactor to utilize sonic-platform package (#1434) [Joe LeVeque]
* 8c5e505 2021-02-17 | [sfputil] Refactor to utilize sonic-platform package (#1421) [Joe LeVeque]
* ca5dd2c 2021-02-17 | [sfpshow] Cleanup (#1405) [Joe LeVeque]
* bf489ea 2021-02-17 | Add new cli for SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter in counterpoll utility (#1355) [Andriy Yurkiv]
* 25feed3 2021-02-08 | Support shared headroom pool on top of dynamic buffer calculation (#1348) [Stephen Sun]
* aaa323a 2021-02-02 | [vrf]: Fix freezing during interface binding (#1325) [maksymbelei95]
* cc0bb6e 2021-01-27 | [show] fix "show interfaces breakout" command (#1198) [Dmytro Shevchuk]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this pull request May 10, 2021
* Replacing using 'get_all' with 'exists' in port state checking procedure inside bind function to avoid freezing in the while loop, what caused by absence of related record in STATE_DB.

Signed-off-by: Maksym Belei <Maksym_Belei@jabil.com>
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
Compiler Warnings : cast increases required alignment of target type [-Wcast-align]
Fix: Use reintrepret cast to cast lower size pointer to bigger size
pointer types

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants