Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

How do I set corp proxy settings? #5

Closed
sandywater opened this issue Apr 20, 2015 · 3 comments
Closed

How do I set corp proxy settings? #5

sandywater opened this issue Apr 20, 2015 · 3 comments

Comments

@sandywater
Copy link

Also can I set a corp CA cert?

Thanks!

@jacobludriks
Copy link

First, create a new directory to store the extra configuration.

mkdir /etc/systemd/system/docker.service.d

Next, create a http-proxy.conf file in the directory and edit it.

touch /etc/systemd/system/docker.service.d/http-proxy.conf
nano /etc/systemd/system/docker.service.d/http-proxy.conf

Add the following information to the file (substituting where necessary) and save with Ctrl + X.

[Service]
Environment="HTTP_PROXY=http://username:password@proxy.example.com:8080/"

Reload the systemd daemon and restart Docker.

systemctl daemon-reload
systemctl restart docker

Information from my blog: http://jacob.ludriks.com/photondockerwindows/

@toliaqat
Copy link
Contributor

Thanks @jacobludriks

@sudtek
Copy link

sudtek commented Apr 3, 2019

Hello,
Sorry to reopen old closed topic to only add my 2 cents to the doc tip about special case with proxy and Docker Service, if your password or login include a "special caracter" in proxy in my case exemple myL@gin or myP@ssword you must not convert @ to %40 !

exemple in my http-proxy.conf

[service]
Environment="http_proxy=http://myL@gin:myP@ssword@10.10.10.10:3128/" "NO_PROXY=localhost,127.0.0.1,.myDomain.LOCAL"

compare to other proxy configuration file where you must convert @ to %40 to avoid that @ be interpreted as delimiteur :
http_proxy=http://myL%40in:myP%40ssword@10.10.10.10:3128/" "NO_PROXY=localhost,127.0.0.1,.myDomain.LOCAL"

thks

Linux photonos01 4.19.29-1.ph3-esx #1-photon SMP Tue Mar 19 13:44:35 UTC 2019 x86_64 GNU/Linux

docker version
Client:
Version: 18.06.2
API version: 1.38
Go version: go1.10.7
Git commit: 6d37f41
Built: Mon Feb 25 14:49:01 2019
OS/Arch: linux/amd64
Experimental: false

Server:
Engine:
Version: 18.06.2-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.7
Git commit: 6d37f41
Built: Mon Feb 25 14:54:48 2019
OS/Arch: linux/amd64
Experimental: false

Proxy : eole-proxy
•Squid : proxy cache ;
•e2guardian : filtrage web ;
• Lightsquid : logs ;
•smbd, nmbd, winbind, krb5 : authentification NTLM ou Kerberos.

gerrit-photon pushed a commit that referenced this issue Mar 8, 2023
If wrong regex is given, then while parsing
  regex we call cleanup_regex
  - parse_task_ignore_string()
   - compile_regex()
    - cleanup_regex()

compiled = *compiled_expr;
if (compiled)
        free(compiled);
- we doesn't reset the *compiled_expr variable after freeing
  and it is extern variable
- again cleanup_regex() gets called from stalld.c
  with already freed address(Non Null Address):
https://git.kernel.org/pub/scm/utils/stalld/stalld.git/tree/src/stalld.c?h=v1.18.0#n1307

- when we `systemctl restart stalld`, we get coredump:
which shows
systemd[1]: Stopping Stall Monitor...
systemd-coredump[780991]: Process 780670 (stalld) of user 0 dumped core.
  Stack trace of thread 780670:
  #0  0x00007f6becf1e041 raise (libc.so.6 + 0x3d041)
  #1  0x00007f6becf07536 abort (libc.so.6 + 0x26536)
  #2  0x00007f6becf5f5a8 n/a (libc.so.6 + 0x7e5a8)
  #3  0x00007f6becf66fea n/a (libc.so.6 + 0x85fea)
  #4  0x00007f6becf673dc n/a (libc.so.6 + 0x863dc)
  #5  0x000055666563ed7e n/a (/usr/bin/stalld (deleted) + 0x6d7e)
systemd[1]: stalld.service: Main process exited, code=dumped, status=6/ABRT
systemd[1]: stalld.service: Failed with result 'core-dump'

- Resetting the extern variable to NULL after
  freeing the memory solves this issue.

Change-Id: Ia75f4fea59476aea3b0aa267fdf0884f95f8b2e2
Signed-off-by: Ankit Jain <ankitja@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/19931
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>
gerrit-photon pushed a commit that referenced this issue Mar 10, 2023
If wrong regex is given, then while parsing
  regex we call cleanup_regex
  - parse_task_ignore_string()
   - compile_regex()
    - cleanup_regex()

compiled = *compiled_expr;
if (compiled)
        free(compiled);
- we doesn't reset the *compiled_expr variable after freeing
  and it is extern variable
- again cleanup_regex() gets called from stalld.c
  with already freed address(Non Null Address):

- when we `systemctl restart stalld`, we get coredump:
which shows
systemd[1]: Stopping Stall Monitor...
systemd-coredump[780991]: Process 780670 (stalld) of user 0 dumped core.
  Stack trace of thread 780670:
  #0  0x00007f6becf1e041 raise (libc.so.6 + 0x3d041)
  #1  0x00007f6becf07536 abort (libc.so.6 + 0x26536)
  #2  0x00007f6becf5f5a8 n/a (libc.so.6 + 0x7e5a8)
  #3  0x00007f6becf66fea n/a (libc.so.6 + 0x85fea)
  #4  0x00007f6becf673dc n/a (libc.so.6 + 0x863dc)
  #5  0x000055666563ed7e n/a (/usr/bin/stalld (deleted) + 0x6d7e)
systemd[1]: stalld.service: Main process exited, code=dumped, status=6/ABRT
systemd[1]: stalld.service: Failed with result 'core-dump'

- Resetting the extern variable to NULL after
  freeing the memory solves this issue.

Change-Id: Ia6bae7379970b5633194619d00c1d19adea120c2
Signed-off-by: Ankit Jain <ankitja@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/19968
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>
gerrit-photon pushed a commit that referenced this issue Mar 10, 2023
If wrong regex is given, then while parsing
  regex we call cleanup_regex
  - parse_task_ignore_string()
   - compile_regex()
    - cleanup_regex()

compiled = *compiled_expr;
if (compiled)
        free(compiled);
- we doesn't reset the *compiled_expr variable after freeing
  and it is extern variable
- again cleanup_regex() gets called from stalld.c
  with already freed address(Non Null Address):

- when we `systemctl restart stalld`, we get coredump:
which shows
systemd[1]: Stopping Stall Monitor...
systemd-coredump[780991]: Process 780670 (stalld) of user 0 dumped core.
  Stack trace of thread 780670:
  #0  0x00007f6becf1e041 raise (libc.so.6 + 0x3d041)
  #1  0x00007f6becf07536 abort (libc.so.6 + 0x26536)
  #2  0x00007f6becf5f5a8 n/a (libc.so.6 + 0x7e5a8)
  #3  0x00007f6becf66fea n/a (libc.so.6 + 0x85fea)
  #4  0x00007f6becf673dc n/a (libc.so.6 + 0x863dc)
  #5  0x000055666563ed7e n/a (/usr/bin/stalld (deleted) + 0x6d7e)
systemd[1]: stalld.service: Main process exited, code=dumped, status=6/ABRT
systemd[1]: stalld.service: Failed with result 'core-dump'

- Resetting the extern variable to NULL after
  freeing the memory solves this issue.

Change-Id: I18244692338599e0a0589c75a2714636bfd8a355
Signed-off-by: Ankit Jain <ankitja@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/19967
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>
tapakund pushed a commit that referenced this issue Mar 20, 2023
If wrong regex is given, then while parsing
  regex we call cleanup_regex
  - parse_task_ignore_string()
   - compile_regex()
    - cleanup_regex()

compiled = *compiled_expr;
if (compiled)
        free(compiled);
- we doesn't reset the *compiled_expr variable after freeing
  and it is extern variable
- again cleanup_regex() gets called from stalld.c
  with already freed address(Non Null Address):

- when we `systemctl restart stalld`, we get coredump:
which shows
systemd[1]: Stopping Stall Monitor...
systemd-coredump[780991]: Process 780670 (stalld) of user 0 dumped core.
  Stack trace of thread 780670:
  #0  0x00007f6becf1e041 raise (libc.so.6 + 0x3d041)
  #1  0x00007f6becf07536 abort (libc.so.6 + 0x26536)
  #2  0x00007f6becf5f5a8 n/a (libc.so.6 + 0x7e5a8)
  #3  0x00007f6becf66fea n/a (libc.so.6 + 0x85fea)
  #4  0x00007f6becf673dc n/a (libc.so.6 + 0x863dc)
  #5  0x000055666563ed7e n/a (/usr/bin/stalld (deleted) + 0x6d7e)
systemd[1]: stalld.service: Main process exited, code=dumped, status=6/ABRT
systemd[1]: stalld.service: Failed with result 'core-dump'

- Resetting the extern variable to NULL after
  freeing the memory solves this issue.

Change-Id: I18244692338599e0a0589c75a2714636bfd8a355
Signed-off-by: Ankit Jain <ankitja@vmware.com>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/19967
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Srivatsa S. Bhat <srivatsab@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants