FROM bash:4.1.17 AS final# Import the user and group files from the first stage.COPY --from=builder /user/group /user/passwd /etc/# Import the Certificate-Authority certificates for enabling HTTPS.COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/# Import the compiled executable from the first stage.COPY --from=builder /app /app# Import the start scriptCOPY --from=builder /usr/local/go/src/github.com/EzeXchange-API/APICore/start.sh /start.shRUN chmod +x /start.shRUN apk add --no-cache curl# Perform any further action as an unprivileged user.USER nobody:nobodyEXPOSE 8000# Run the compiled binary.ENTRYPOINT ["bash", "/start.sh"]
CREATE DATABASE example_database;CREATE USER example_database_user WITH PASSWORD 'secure_password';GRANT ALL PRIVILEGES ON DATABASE example_database TO example_database_user;