title: docker -minio - The access key ID you provided does not exist in our records
body: <p>I have a docker file that should wait for a database with wait_for_it.sh and run a minio server.</p>
  
  <p>I read the secrets from run/secrets and creates the MINIO_SECRET_KEY and MINIO_ACCESS_KEY.</p>
  
  <p>THE MINIO SERVER is up but I cannot connect with a minio client (js client) and I GOT the following error:</p>
  
  <pre><code>The access key ID you provided does not exist in our records
  </code></pre>
  
  <p>My client code:</p>
  
  <pre><code>      const accessKey = fileService.readFile(configService.get('minio').access_key_file);
          const secretKey = fileService.readFile(configService.get('minio').secret_key_file);
  
      this.minioClient = new Minio.Client({
                  endPoint: configService.get('minio').host,
                  port: configService.get('minio').port,
                  useSSL: configService.get('minio').useSSL,
                  accessKey: accessKey.trim(),
                  secretKey: secretKey.trim()
              });
  </code></pre>
  
  <p>my docker entry point (bash):</p>
  
  <pre><code>docker_secrets_env() {
      ACCESS_KEY_FILE="$MINIO_ACCESS_KEY_FILE"
      SECRET_KEY_FILE="$MINIO_SECRET_KEY_FILE"
  
      if [ -f "$ACCESS_KEY_FILE" ] &amp;&amp; [ -f "$SECRET_KEY_FILE" ]; then
          if [ -f "$ACCESS_KEY_FILE" ]; then
              MINIO_ACCESS_KEY="$(cat "$ACCESS_KEY_FILE")"
              export MINIO_ACCESS_KEY
          fi
          if [ -f "$SECRET_KEY_FILE" ]; then
              MINIO_SECRET_KEY="$(cat "$SECRET_KEY_FILE")"
              export MINIO_SECRET_KEY
          fi
      fi
  }
  
  docker_secrets_env
  
  ./wait-for-it.sh mongo:27017 --timeout=0 --strict -- \
      minio server /data  &amp; \
  </code></pre>
  
  <p>thanks</p>