<commit_before># docker saltstack setup

Create a docker image with:

- Ubuntu
- salt-master
- salt-minion
- salt-api

## How to build it

- build

docker build -t salt-ubuntu .

- run

docker run --rm -p 8000:8000 -it salt-ubuntu

- test

curl -sk http://localhost:8000/run -H 'Accept: application/json' -d username='saltuser' -d password='<PASSWORD>' -d eauth='pam' -d client='local' -d tgt='*' -d fun='test.ping'
or
curl -sk http://localhost:8000/login -H 'Accept: application/json' -d username='saltuser' -d password='<PASSWORD>' -d eauth='pam' -d client='local' -d tgt='*'<commit_msg>added login command for test<commit_after># docker saltstack setup

Create a docker image with:

- Ubuntu
- salt-master
- salt-minion
- salt-api

## How to build it

- build

docker build -t salt-ubuntu .

- run

docker run --rm -p 8000:8000 -it salt-ubuntu

- test

curl -sk http://localhost:8000/run -H 'Accept: application/json' -d username='saltuser' -d password='<PASSWORD>' -d eauth='pam' -d client='local' -d tgt='*' -d fun='test.ping'

or

curl -sk http://localhost:8000/login -H 'Accept: application/json' -d username='saltuser' -d password='<PASSWORD>' -d eauth='pam' -d client='local' -d tgt='*'
{'fraction_non_alphanumeric': 0.16569037656903765, 'fraction_numerical': 0.026778242677824266, 'mean_word_length': 3.6536964980544746, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5157264', 'n_tokens_mistral': 481, 'n_tokens_neox': 424, 'n_words': 135}