Skip to content

Commit

Permalink
feat(services): disable services at boot time
Browse files Browse the repository at this point in the history
  • Loading branch information
javierbertoli committed Jun 1, 2020
1 parent ec4a2f0 commit b4595eb
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Dockerfile.apt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ RUN echo 'locales locales/default_environment_locale select en_US.UTF-8' | debco
RUN dpkg-reconfigure -f noninteractive locales

RUN curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
&& for fname in api master minion syndic; do \
/bin/systemctl disable salt-$fname.service; \
done

RUN rm -rf /var/cache/{salt,apt} \
&& rm -rf /var/lib/apt/lists/* \
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.dnf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ ARG PKGS="udev git net-tools sudo curl openssh-server openssh-clients which find
RUN dnf -y update && dnf -y install ${PKGS}

RUN curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
&& for fname in api master minion syndic; do \
/bin/systemctl disable salt-$fname.service; \
done

RUN rm -rf /var/cache/{salt,pacman} \
&& (find / -name "*pyc" ; find / -name "__pycache__") |grep -v /proc | xargs rm -rf
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.pac
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ RUN pacman --noconfirm -Sy archlinux-keyring \
RUN systemctl enable sshd

RUN curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
&& for fname in api master minion syndic; do \
/bin/systemctl disable salt-$fname.service; \
done

RUN rm -rf /var/cache/{salt,pacman} \
&& (find / -name "*pyc" ; find / -name "__pycache__") |grep -v /proc | xargs rm -rf
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.yum
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ RUN yum -y update && yum -y install ${PKGS}
# FIXME: modifying this here is really, really, really horrible and messy
RUN curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sed "s/python34/python3/g" | \
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
&& for fname in api master minion syndic; do \
/bin/systemctl disable salt-$fname.service; \
done

# Centos 6 installs python27-pip from the salt repo
RUN if [ "${DISTRO_NAME}" = "centos" -a "${DISTRO_VERSION}" = "6" ]; \
Expand Down
5 changes: 4 additions & 1 deletion Dockerfile.zyp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ RUN systemctl enable sshd
RUN if [ ! -e /etc/SuSE-release ]; then ln -s /etc/os-release /etc/SuSE-release; fi

RUN curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/bootstrap-salt.sh | \
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION \
&& for fname in api master minion syndic; do \
/bin/systemctl disable salt-$fname.service; \
done

RUN rm -rf /var/cache/{salt,zyp} \
&& (find / -name "*pyc" ; find / -name "__pycache__") |grep -v /proc | xargs rm -rf
Expand Down

0 comments on commit b4595eb

Please sign in to comment.