1- FROM ubuntu:22 .04
1+ FROM ubuntu:24 .04
22
33LABEL maintainer="Erwin Dondorp <saltgui@dondorp.com>"
44LABEL name=salt-master
@@ -8,28 +8,27 @@ LABEL version=3007.1
88ENV SALT_VERSION=3007.1
99ENV DEBIAN_FRONTEND=noninteractive
1010
11- # fix ubuntu
12- # see https://askubuntu.com/questions/1235914/hash-sum-mismatch-error-due-to-identical-sha1-and-md5-but-different-sha256
13- RUN mkdir /etc/gcrypt && echo all >> /etc/gcrypt/hwf.deny
14-
15- # add saltstack repo
16- RUN apt-get update
17- RUN apt-get install --yes --no-install-recommends curl ca-certificates gnupg2 net-tools dirmngr
18- RUN curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2023.gpg https://repo.saltproject.io/salt/py3/ubuntu/22.04/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
19- RUN echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg arch=amd64] https://repo.saltproject.io/salt/py3/ubuntu/22.04/amd64/minor/${SALT_VERSION} jammy main" > /etc/apt/sources.list.d/salt.list
11+ # make download possible, make encrypted password generation possible
2012RUN apt-get update
21-
22- # install salt-master and salt-api
23- RUN apt-get install salt-master=${SALT_VERSION} salt-api=${SALT_VERSION} --yes --no-install-recommends
13+ RUN apt-get install --yes --no-install-recommends curl openssl adduser
2414
2515# add a user for the frontend salt:salt
16+ RUN adduser salt
2617RUN usermod -s /bin/bash -p "$(openssl passwd -1 salt)" salt
2718
19+ # install salt-master with salt-api
20+ # not using repo, so must explicitly do all packages
21+ RUN curl -k -L -o salt-common_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-common_${SALT_VERSION}_amd64.deb
22+ RUN curl -k -L -o salt-api_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-api_${SALT_VERSION}_amd64.deb
23+ RUN curl -k -L -o salt-master_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-master_${SALT_VERSION}_amd64.deb
24+ RUN apt install --yes --no-install-recommends ./salt-common_${SALT_VERSION}.deb ./salt-master_${SALT_VERSION}.deb ./salt-api_${SALT_VERSION}.deb
25+
2826# install supervisor
29- RUN apt-get install supervisor --yes --no-install-recommends
27+ # becausewe need to run salt-master and salt-api
28+ RUN apt-get install --yes --no-install-recommends supervisor
3029
3130# cleanup temporary files
32- RUN rm -rf /var/lib/apt/lists/* \
31+ RUN rm -rf /var/lib/apt/lists/* *.deb \
3332 && apt-get --yes autoremove \
3433 && apt-get clean
3534
@@ -41,4 +40,5 @@ VOLUME ["/pki", "/var/cache/salt", "/var/log/salt"]
4140EXPOSE 3333 4505 4506
4241
4342# define main container command
44- CMD /usr/bin/supervisord
43+ # explicitly mentioning the (default) configuration file saves a warning
44+ CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
0 commit comments