Answer the question
In order to leave comments, you need to log in
How to mount docker container s3 (AWS)?
TL;DR: The 3rd party container host is "blahblah", but you need to connect to it with "some.blahblah" as the name.
And now a little more:
Raised a container with s3 (minito), has the following configs:
minio:
container_name: "minio"
build: ./docker/minio
volumes:
- minio:/export
ports:
- "9000:9000"
environment:
- MINIO_ACCESS_KEY=access
- MINIO_SECRET_KEY=secretkey
extra_hosts:
- "bucket.minio:172.25.0.4"
S3_HOST=http://minio:9000
S3_KEY=access
S3_SECRET=secret
S3_REGION=us-east-1
S3_BUCKET=bucket
RUN getent hosts minio | awk '{ print $1 " bucket." $2 }' >> /etc/hosts
// Original
$ ping minio
PING minio (172.26.0.4): 56 data bytes
64 bytes from 172.26.0.4: icmp_seq=0 ttl=64 time=0.065 ms
$ curl minio:9000
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied.</Message><Key></Key><BucketName></BucketName><Resource>/</Resource><RequestId>3L137</RequestId><HostId>3L137</HostId></Error>
// Alias
$ ping bucket.minio
PING bucket.minio (172.25.0.4): 56 data bytes
...
36 packets transmitted, 0 packets received, 100% packet loss
$ curl bucket.minio:9000
...
Вообще вешается
Answer the question
In order to leave comments, you need to log in
Cheat code:
minio:
container_name: "bucket.minio" <---
build: ./docker/minio
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question