Skip to content

Instantly share code, notes, and snippets.

@cometaj2
Last active January 1, 2025 21:23
Show Gist options
  • Save cometaj2/adf8cd72697ace88053848b74299b3f5 to your computer and use it in GitHub Desktop.
Save cometaj2/adf8cd72697ace88053848b74299b3f5 to your computer and use it in GitHub Desktop.
jsonf (port 80) and hco (port 9000) hcli examples in docker container
FROM python:3.11-alpine3.16
EXPOSE 80
EXPOSE 9000
RUN pip install --upgrade pip
RUN pip install hcli_core
RUN pip install gunicorn
RUN echo -e "[config]\n\
core.auth = False\n\
mgmt.port = 9000\n\
[default]\n\
username = admin\n\
password = *\n\
salt = *" > /test_credentials && \
chmod 600 /test_credentials
CMD gunicorn --workers=5 --threads=5 -b 0.0.0.0:80 -b 0.0.0.0:9000 "hcli_core:connector(config_path=\"/test_credentials\")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment