Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build fails #677

Merged
merged 1 commit into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker/dockerfiles/conf/supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[supervisord]
nodaemon=true
user=root
loglevel=warn

[program:saltmaster]
command=/usr/bin/salt-master -l info
Expand Down
6 changes: 1 addition & 5 deletions docker/dockerfiles/dockerfile-saltgui-nginx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

LABEL maintainer="Erwin Dondorp <[email protected]>"
LABEL name=saltgui-nginx
Expand All @@ -8,10 +8,6 @@ LABEL version=1.18.0
ENV NGINX_VERSION=1.18.0
ENV DEBIAN_FRONTEND=noninteractive

# fix ubuntu
# see https://askubuntu.com/questions/1235914/hash-sum-mismatch-error-due-to-identical-sha1-and-md5-but-different-sha256
RUN mkdir /etc/gcrypt && echo all >> /etc/gcrypt/hwf.deny

RUN apt-get update \
# install nginx
&& apt-get install -y nginx=${NGINX_VERSION}* --no-install-recommends \
Expand Down
32 changes: 16 additions & 16 deletions docker/dockerfiles/dockerfile-saltmaster
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

LABEL maintainer="Erwin Dondorp <[email protected]>"
LABEL name=salt-master
Expand All @@ -8,28 +8,27 @@ LABEL version=3007.1
ENV SALT_VERSION=3007.1
ENV DEBIAN_FRONTEND=noninteractive

# fix ubuntu
# see https://askubuntu.com/questions/1235914/hash-sum-mismatch-error-due-to-identical-sha1-and-md5-but-different-sha256
RUN mkdir /etc/gcrypt && echo all >> /etc/gcrypt/hwf.deny

# add saltstack repo
RUN apt-get update
RUN apt-get install --yes --no-install-recommends curl ca-certificates gnupg2 net-tools dirmngr
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
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
# make download possible, make encrypted password generation possible
RUN apt-get update

# install salt-master and salt-api
RUN apt-get install salt-master=${SALT_VERSION} salt-api=${SALT_VERSION} --yes --no-install-recommends
RUN apt-get install --yes --no-install-recommends curl openssl adduser

# add a user for the frontend salt:salt
RUN adduser salt
RUN usermod -s /bin/bash -p "$(openssl passwd -1 salt)" salt

# install salt-master with salt-api
# not using repo, so must explicitly do all packages
RUN curl -k -L -o salt-common_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-common_${SALT_VERSION}_amd64.deb
RUN curl -k -L -o salt-api_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-api_${SALT_VERSION}_amd64.deb
RUN curl -k -L -o salt-master_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-master_${SALT_VERSION}_amd64.deb
RUN apt install --yes --no-install-recommends ./salt-common_${SALT_VERSION}.deb ./salt-master_${SALT_VERSION}.deb ./salt-api_${SALT_VERSION}.deb

# install supervisor
RUN apt-get install supervisor --yes --no-install-recommends
# becausewe need to run salt-master and salt-api
RUN apt-get install --yes --no-install-recommends supervisor

# cleanup temporary files
RUN rm -rf /var/lib/apt/lists/* \
RUN rm -rf /var/lib/apt/lists/* *.deb \
&& apt-get --yes autoremove \
&& apt-get clean

Expand All @@ -41,4 +40,5 @@ VOLUME ["/pki", "/var/cache/salt", "/var/log/salt"]
EXPOSE 3333 4505 4506

# define main container command
CMD /usr/bin/supervisord
# explicitly mentioning the (default) configuration file saves a warning
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
15 changes: 7 additions & 8 deletions docker/dockerfiles/dockerfile-saltminion-centos
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@ LABEL version=3007.1
ENV SALT_VERSION=3007.1
ENV DEBIAN_FRONTEND=noninteractive

# add saltstack repo
RUN yum install --assumeyes epel-release curl gnupg2 net-tools
RUN rpm --import https://repo.saltproject.io/salt/py3/redhat/9/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub
RUN curl -fsSL https://repo.saltproject.io/salt/py3/redhat/9/x86_64/minor/3007.1.repo > /etc/yum.repos.d/salt.repo
RUN yum update --assumeyes
# get saltstack software
RUN yum install --assumeyes epel-release curl

# install salt-minion
RUN yum install --assumeyes salt-minion-${SALT_VERSION}
# not using repo, so must explicitly do all packages
RUN yum install --assumeyes https://packages.broadcom.com/artifactory/saltproject-rpm/salt-${SALT_VERSION}-0.x86_64.rpm
RUN yum install --assumeyes https://packages.broadcom.com/artifactory/saltproject-rpm/salt-minion-${SALT_VERSION}-0.x86_64.rpm

# cleanup temporary files
RUN rm -rf /var/lib/yum/* /var/cache/yum \
RUN rm -rf /var/lib/yum/* /var/cache/yum *.rpm \
&& yum clean all

# copy the minion configuration
COPY ./conf/minion /etc/salt/minion

# define main container command
CMD /usr/bin/salt-minion
CMD ["/usr/bin/salt-minion"]
18 changes: 10 additions & 8 deletions docker/dockerfiles/dockerfile-saltminion-debian
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ LABEL version=3007.1
ENV SALT_VERSION=3007.1
ENV DEBIAN_FRONTEND=noninteractive

# add saltstack repo
RUN apt-get update
RUN apt-get install --yes --no-install-recommends curl ca-certificates gnupg2 net-tools dirmngr
RUN curl -fsSL -o /etc/apt/keyrings/salt-archive-keyring-2023.gpg https://repo.saltproject.io/salt/py3/debian/12/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/salt-archive-keyring-2023.gpg arch=amd64] https://repo.saltproject.io/salt/py3/debian/12/amd64/minor/${SALT_VERSION} bookworm main" > /etc/apt/sources.list.d/salt.list
# make download possible
RUN apt-get update
RUN apt-get install --yes --no-install-recommends curl

# install salt-minion
RUN apt-get install salt-minion=${SALT_VERSION} --yes --no-install-recommends
# not using repo, so must explicitly do all packages
RUN curl -k -L -o salt-common_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-common_${SALT_VERSION}_amd64.deb
RUN curl -k -L -o salt-minion_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-minion_${SALT_VERSION}_amd64.deb
RUN apt install --yes --no-install-recommends ./salt-common_${SALT_VERSION}.deb ./salt-minion_${SALT_VERSION}.deb

# cleanup temporary files
RUN rm -rf /var/lib/apt/lists/* \
RUN rm -rf /var/lib/apt/lists/* *.deb \
&& apt-get -y autoremove \
&& apt-get clean

# copy the minion configuration
COPY ./conf/minion /etc/salt/minion

ENV CRYPTOGRAPHY_OPENSSL_NO_LEGACY=true

# define main container command
CMD /usr/bin/salt-minion
CMD ["/usr/bin/salt-minion"]
24 changes: 11 additions & 13 deletions docker/dockerfiles/dockerfile-saltminion-ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

LABEL maintainer="Erwin Dondorp <[email protected]>"
LABEL name=salt-minion
Expand All @@ -8,27 +8,25 @@ LABEL version=3007.1
ENV SALT_VERSION=3007.1
ENV DEBIAN_FRONTEND=noninteractive

# fix ubuntu
# see https://askubuntu.com/questions/1235914/hash-sum-mismatch-error-due-to-identical-sha1-and-md5-but-different-sha256
RUN mkdir /etc/gcrypt && echo all >> /etc/gcrypt/hwf.deny

# add saltstack repo
RUN apt-get update
RUN apt-get install --yes --no-install-recommends curl ca-certificates gnupg2 net-tools
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
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
# make download possible
RUN apt-get update
RUN apt-get install --yes --no-install-recommends curl

# install salt-minion
RUN apt-get install salt-minion=${SALT_VERSION} --yes --no-install-recommends
# not using repo, so must explicitly do all packages
RUN curl -k -L -o salt-common_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-common_${SALT_VERSION}_amd64.deb
RUN curl -k -L -o salt-minion_${SALT_VERSION}.deb https://packages.broadcom.com/artifactory/saltproject-deb/pool/salt-minion_${SALT_VERSION}_amd64.deb
RUN apt install --yes --no-install-recommends ./salt-common_${SALT_VERSION}.deb ./salt-minion_${SALT_VERSION}.deb

# cleanup temporary files
RUN rm -rf /var/lib/apt/lists/* \
RUN rm -rf /var/lib/apt/lists/* *.deb \
&& apt-get -y autoremove \
&& apt-get clean

# copy the minion configuration
COPY ./conf/minion /etc/salt/minion

ENV CRYPTOGRAPHY_OPENSSL_NO_LEGACY=true

# define main container command
CMD /usr/bin/salt-minion
CMD ["/usr/bin/salt-minion"]
Loading