docker-elk: Unable to setup stack behind proxy
Problem description
I’m trying to setup this stack behind a proxy. However, it fails due to timeout.
I have my docker daemon already configured to use the proxy and I use if for my other projects. However, it appears this is not considered when the stack gets built. Upon a cursory search it appears that additonal commands are required when a container is “built” like these are. I’ve tried various methods provided by the Docker docs , but I don’t have a working solution.
Are there additional proxy commands or config changes that must be used to make this stack work behind a proxy?
If so, can you share them and possibly make a guide and an optional variable in the .env so if a person populates for instance HTTP_PROXY=my.proxy.com:3128 it will utilize that in the build process? I can’t be the first person that has tried to put this up behind a proxy.
Extra information
Stack configuration
Docker setup
$ docker version
[Version: 24.0.2
API version: 1.43
Go version: go1.20.4
Git commit: cb74dfc
Built: Thu May 25 21:51:00 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 24.0.2
API version: 1.43 (minimum version 1.12)
Go version: go1.20.4
Git commit: 659604f
Built: Thu May 25 21:51:00 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0
]
$ docker-compose version
[This is now built-in to newer versions of Docker and no longer applicable.]
Container logs
$ docker-compose logs
[[+] Building 30.3s (3/3) FINISHED
=> [tls internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 193B 0.0s
=> [tls internal] load .dockerignore 0.0s
=> => transferring context: 129B 0.0s
=> ERROR [tls internal] load metadata for [docker.elastic.co/elasticsearch/elasticsearch:8.7.1](http://docker.elastic.co/elasticsearch/elasticsearch:8.7.1) 30.3s
------
> [tls internal] load metadata for [docker.elastic.co/elasticsearch/elasticsearch:8.7.1](http://docker.elastic.co/elasticsearch/elasticsearch:8.7.1):
------
failed to solve: DeadlineExceeded: DeadlineExceeded: DeadlineExceeded: [docker.elastic.co/elasticsearch/elasticsearch:8.7.1](http://docker.elastic.co/elasticsearch/elasticsearch:8.7.1): failed to authorize: DeadlineExceeded: failed to fetch anonymous token: Get https://docker-auth.elastic.co/auth?scope=repository%3Aelasticsearch%2Felasticsearch%3Apull&service=token-service: dial tcp [34.68.230.202:443](http://34.68.230.202:443/): i/o timeout]
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16
Ok so for my sitauton the config.json doesn’t work. However, when I set the bash variables for
http_proxy&https_proxyeverything is now working. Closing issue as its now resolved.