willnorris / imageproxy

A caching, resizing image proxy written in Go
Apache License 2.0
3.56k stars 484 forks source link

can not cache using minio #338

Open wumuwumu opened 2 years ago

wumuwumu commented 2 years ago

When I use minio, I can't find the corresponding address, S3ForcePathStyle always doesn't work。

docker run -d -p 9001:8080 -e AWS_ACCESS_KEY_ID=AK -e AWS_SECRET_KEY=wJal ghcr.io/willnorris/imageproxy -addr 0.0.0.0:8080 -cache s3://zh-east-1/image-cache/images?endpoint=http://192.168.50.11:9328&disableSSL=1&s3ForcePathStyle=1

error: http://image-cache.192.168.50.11:9228/images/b3ff1785ff8282ded0e94a9ad5007984": dial tcp: lookup image-cache.192.168.50.11 on 223.5.5.5:53: no such host

version: lastest os: centos8

ArcherTrister commented 2 years ago

@wumuwumu I also encountered, may I ask you to solve it?

image

image

rayNip commented 2 years ago

@ArcherTrister

Try replacing s3:// with http://

S3: s3://{region}/{bucket}/{path} s3://s3-us-east-2.amazonaws.com/bucketname/images Minio: http://{endpoint}/{bucket}/{path} http://minio.dev:9000/bucketname/images

zhangshuiyong commented 4 months ago

I figure out what's problem with that error add a quote '' to the s3 link can solve it like below cmd: imageproxy -addr 0.0.0.0:8080 -verbose -cache memory -cache 's3://us-east-1/cache/upload?endpoint=minio:9000&disableSSL=1&s3ForcePathStyle=1'