Eu tenho um Dockerfile como abaixo:
FROM postgres
COPY ./create_user.sh /docker-entrypoint-initdb.d/user.sh
COPY ./create_db.sh /docker-entrypoint-initdb.d/db.sh
RUN chmod +x /docker-entrypoint-initdb.d/user.sh
RUN chmod +x /docker-entrypoint-initdb.d/db.sh
Estou usando o Windows para criar a imagem do docker e executar o contêiner.
Ao criar a imagem do docker, recebi o aviso de segurança abaixo:
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
Embora a imagem do docker tenha sido criada, estou recebendo um erro ao executar o contêiner docker da imagem:
/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/user.sh
: invalid optionnt-initdb.d/user.sh: line 2: set: -
set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
LOG: received SIGHUP, reloading configuration files
LOG: parameter "listen_addresses" cannot be changed without restarting the server
LOG: configuration file "/var/lib/postgresql/data/postgresql.conf" contains errors; unaffected changes were applied.
Como posso corrigir isso?