我有一个公司代理和 docker 注册表(nexus)。当我执行 command:
docker login -u <corporate_login> -p <pass> https://nexus-corporate.com
时,我获得了成功的连接。但是当我使用 docker-in-docker image 并执行类似的命令时,代理存在问题。如何解决问题?
错误信息:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta type="copyright" content="Copyright (C) 1996-2018 The Squid Software Foundation and contributors">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>
<style type="text/css"><!--
/*
* Copyright (C) 1996-2018 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Please see the COPYING and CONTRIBUTORS files for details.
*/
/*
Stylesheet for Squid Error pages
Adapted from design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/
.....
body
:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
:lang(he) { direction: rtl; }
--></style>
</head><body id=ERR_ACCESS_DENIED>
<div id="titles">
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>
<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="http://docker:2375/v1.40/auth">http://docker:2375/v1.40/auth</a></p>
<blockquote id="error">
<p><b>Access Denied.</b></p>
</blockquote>
<p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p>
<p>Your cache administrator is <a href="mailto:admin@my_company.com?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&body=CacheHost%3A%20proxy.my_company_domain%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Mon,%2027%20Jan%202020%2008%3A39%3A45%20GMT%0D%0A%0D%0AClientIP%3A%2010.16.11.54%0D%0A%0D%0AHTTP%20Request%3A%0D%0APOST%20%2Fv1.40%2Fauth%20HTTP%2F1.1%0AUser-Agent%3A%20Docker-Client%2F19.03.5%20(linux)%0D%0AContent-Length%3A%2084%0D%0AContent-Type%3A%20application%2Fjson%0D%0AHost%3A%20docker%3A2375%0D%0A%0D%0A%0D%0A">admin@my_company.com</a>.</p>
<br>
</div>
<hr>
<div id="footer">
<p>Generated Mon, 27 Jan 2020 08:39:45 GMT by proxy.my_company_domain (squid/4.4)</p>
<!-- ERR_ACCESS_DENIED -->
</div>
</body></html>