getting rid of custom stuff
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
FROM ubuntu:jammy-20230816
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VCS_REF
|
ARG VCS_REF
|
||||||
|
|
||||||
# https://github.com/saltstack/salt/releases
|
# https://github.com/saltstack/salt/releases
|
||||||
ENV SALT_VERSION="3006.3"
|
ENV SALT_VERSION="3002.6+dfsg1-4+deb11u1"
|
||||||
ENV IMAGE_VERSION="${SALT_VERSION}_1"
|
ENV IMAGE_VERSION="${SALT_VERSION}_1"
|
||||||
|
|
||||||
ENV SALT_DOCKER_DIR="/etc/docker-salt" \
|
ENV SALT_DOCKER_DIR="/etc/docker-salt" \
|
||||||
|
|||||||
@@ -139,10 +139,10 @@ function add_salt_repository()
|
|||||||
local arch=amd64
|
local arch=amd64
|
||||||
is_arm64 && arch=arm64
|
is_arm64 && arch=arm64
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
local keyring_file="/etc/apt/keyrings/salt-archive-keyring.gpg"
|
local keyring_file="/etc/apt/keyrings/salt-archive-keyring.gpg"
|
||||||
local root_url="https://repo.saltproject.io/salt/py3/ubuntu/${VERSION_ID:?}/${arch}"
|
#https://repo.saltproject.io/salt/py3/debian/11/arm64/SALT-PROJECT-GPG-PUBKEY-2023.gpg
|
||||||
|
local root_url="https://repo.saltproject.io/salt/py3/debian/${VERSION_ID:?}/${arch}"
|
||||||
download "${root_url}/SALT-PROJECT-GPG-PUBKEY-2023.gpg" "${keyring_file}"
|
download "${root_url}/SALT-PROJECT-GPG-PUBKEY-2023.gpg" "${keyring_file}"
|
||||||
echo "deb [signed-by=${keyring_file} arch=${arch}] ${root_url}/minor/${SALT_VERSION} ${VERSION_CODENAME:?} main" > /etc/apt/sources.list.d/salt.list
|
echo "deb [signed-by=${keyring_file} arch=${arch}] ${root_url}/minor/${SALT_VERSION} ${VERSION_CODENAME:?} main" > /etc/apt/sources.list.d/salt.list
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ source "${FUNCTIONS_FILE}"
|
|||||||
|
|
||||||
log_info "Installing required packages and build dependencies ..."
|
log_info "Installing required packages and build dependencies ..."
|
||||||
REQUIRED_PACKAGES=(
|
REQUIRED_PACKAGES=(
|
||||||
binutils patchelf
|
binutils patchelf python3-pip
|
||||||
)
|
)
|
||||||
|
|
||||||
BUILD_DEPENDENCIES=()
|
BUILD_DEPENDENCIES=()
|
||||||
|
|
||||||
log_info "Adding salt repository..."
|
#log_info "Adding salt repository..."
|
||||||
add_salt_repository
|
#add_salt_repository
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
install_pkgs "${REQUIRED_PACKAGES[@]}" "${BUILD_DEPENDENCIES[@]}"
|
install_pkgs "${REQUIRED_PACKAGES[@]}" "${BUILD_DEPENDENCIES[@]}"
|
||||||
@@ -28,6 +28,7 @@ log_info "Creating ${SALT_USER} user ..."
|
|||||||
useradd --home-dir "${SALT_HOME}" --create-home \
|
useradd --home-dir "${SALT_HOME}" --create-home \
|
||||||
--shell /bin/bash --user-group "${SALT_USER}" \
|
--shell /bin/bash --user-group "${SALT_USER}" \
|
||||||
--groups shadow
|
--groups shadow
|
||||||
|
id ${SALT_USER}
|
||||||
|
|
||||||
# Set PATH
|
# Set PATH
|
||||||
exec_as_salt cat >> "${SALT_HOME}/.profile" <<EOF
|
exec_as_salt cat >> "${SALT_HOME}/.profile" <<EOF
|
||||||
@@ -40,7 +41,7 @@ install_pkgs salt-master="${SALT_VERSION}" salt-api="${SALT_VERSION}"
|
|||||||
|
|
||||||
# Install python packages
|
# Install python packages
|
||||||
log_info "Installing python packages ..."
|
log_info "Installing python packages ..."
|
||||||
salt-pip install pygit2==1.12.2
|
pip3 install pygit2==1.12.2
|
||||||
|
|
||||||
# Configure ssh
|
# Configure ssh
|
||||||
log_info "Configuring ssh ..."
|
log_info "Configuring ssh ..."
|
||||||
|
|||||||
@@ -645,10 +645,10 @@ function initialize_system()
|
|||||||
initialize_datadir
|
initialize_datadir
|
||||||
configure_logrotate
|
configure_logrotate
|
||||||
configure_timezone
|
configure_timezone
|
||||||
configure_salt_master
|
#configure_salt_master
|
||||||
configure_salt_api
|
#configure_salt_api
|
||||||
configure_salt_formulas
|
#configure_salt_formulas
|
||||||
configure_config_reloader
|
configure_config_reloader
|
||||||
setup_salt_keys
|
#setup_salt_keys
|
||||||
rm -rf /var/run/supervisor.sock
|
rm -rf /var/run/supervisor.sock
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ case "${1}" in
|
|||||||
;;
|
;;
|
||||||
app:gen-signed-keys)
|
app:gen-signed-keys)
|
||||||
shift 1
|
shift 1
|
||||||
gen_signed_keys "${1}"
|
#gen_signed_keys "${1}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -41,7 +41,7 @@ case "${1}" in
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
app:reload-3rd-formulas)
|
app:reload-3rd-formulas)
|
||||||
configure_salt_formulas
|
#configure_salt_formulas
|
||||||
exec "$0" app:restart salt-master
|
exec "$0" app:restart salt-master
|
||||||
;;
|
;;
|
||||||
app:help)
|
app:help)
|
||||||
|
|||||||
Reference in New Issue
Block a user