scality / cloudserver

Zenko CloudServer, an open-source Node.js implementation of the Amazon S3 protocol on the front-end and backend storage capabilities to multiple clouds, including Azure and Google.
https://www.zenko.io/cloudserver
Apache License 2.0
1.69k stars 240 forks source link

Out of the box SSL=true fails. docker-entrypoint.sh uses openssl, but it's not installed on the image. #5561

Open ndtreviv opened 4 months ago

ndtreviv commented 4 months ago

Description

I want to run Zenko CloudServer over SSL. There's an option to set SSL=true on the docker container, at which point the docker-entrypoint.sh will generate self-signed certificates using openssl.

openssl is not installed on the base image, so when docker-entrypoint.sh attempts to call it, the container exits with an error code.

Steps to reproduce the issue

Using this docker-compose file:

version: '3'
services:
  s3server:
    # image: zenko/cloudserver:latest
    image: registry.scality.com/cloudserver/cloudserver:8.7.43
    container_name: s3server
    restart: unless-stopped
    ports:
      - "8000:8000"
    volumes:
      - s3data:/usr/src/app/localData
      - s3metadata:/usr/src/app/localMetadata
    environment:
      # - SCALITY_ACCESS_KEY_ID=newAccessKey
      # - SCALITY_SECRET_ACCESS_KEY=newSecretKey
      - REMOTE_MANAGEMENT_DISABLE=1
      - SSL=true
      - S3BACKEND=file
      - ENDPOINT=cloudserver
volumes:
  s3data:
  s3metadata:

run: docker-compose up

Actual result

The container exits after hitting the error in the docker-entrypoint.sh:

[+] Building 0.0s (0/0)                                                                                        docker:desktop-linux
[+] Running 2/0
 ✔ Container s3server                                                                                                                                      Recreated0.0s 
 ! s3server The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested 0.0s 
Attaching to s3server
s3server  | Host name has been modified to cloudserver
s3server  | Note: In your /etc/hosts file on Linux, OS X, or Unix with root permissions, make sure to associate 127.0.0.1 with cloudserver
s3server  | /usr/src/app/docker-entrypoint.sh: line 54: openssl: command not found

Expected result

The entrypoint should generate the self signed certs and the server should start up successfully.

Additional information

Suggested fix

Install openssl on the base image.

ndtreviv commented 2 months ago

Is this repo being maintained? Feels like not.