Remove debian 9 in favor of debian 10

This commit is contained in:
Carlos Rodriguez Hernandez 2020-01-24 14:32:37 +00:00
parent 08d302c675
commit 3cb70a5458
14 changed files with 0 additions and 527 deletions

View File

@ -1,40 +0,0 @@
FROM bitnami/minideb:stretch
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV BITNAMI_PKG_CHMOD="-R g+rwX" \
HOME="/" \
PATH="/opt/bitnami/node/bin:/opt/bitnami/mongodb/bin:/opt/bitnami/parse/bin:/opt/bitnami/nami/bin:$PATH"
COPY prebuildfs /
# Install required system packages and dependencies
RUN install_packages ca-certificates curl dirmngr ghostscript gnupg imagemagick libbz2-1.0 libc6 libgcc1 libncurses5 libreadline7 libsqlite3-0 libssl1.1 libstdc++6 libtinfo5 procps sudo unzip zlib1g
RUN /build/bitnami-user.sh && \
/build/install-nami.sh
RUN bitnami-pkg install node-8.17.0-0 --checksum 9bef20112e24338a21308390777eb2dda0b28eb02a3609c898c192bd38560fbc
RUN bitnami-pkg install mongodb-client-4.0.14-0 --checksum a889253beb0ac83659ba396feeb0a3501462c786c19014f7e828dc384df94262
RUN bitnami-pkg unpack parse-3.10.0-0 --checksum 4a7cd1933aefd9364c8e2329854f2f3a774c1163a7e9548114b91c6f0bacec1f
RUN apt-get update && apt-get upgrade && \
rm -r /var/lib/apt/lists /var/cache/apt/archives
RUN /build/install-gosu.sh
RUN /build/install-tini.sh
COPY rootfs /
ENV BITNAMI_APP_NAME="parse" \
BITNAMI_IMAGE_VERSION="3.10.0-debian-9-r11" \
MONGODB_HOST="mongodb" \
MONGODB_PASSWORD="" \
MONGODB_PORT_NUMBER="27017" \
MONGODB_USER="root" \
NAMI_PREFIX="/.nami" \
PARSE_APP_ID="myappID" \
PARSE_ENABLE_CLOUD_CODE="no" \
PARSE_HOST="127.0.0.1" \
PARSE_MASTER_KEY="mymasterKey" \
PARSE_MOUNT_PATH="/parse" \
PARSE_PORT_NUMBER="1337"
EXPOSE 1337
USER 1001
ENTRYPOINT [ "/app-entrypoint.sh" ]
CMD [ "/run.sh" ]

View File

@ -1,19 +0,0 @@
version: '2'
services:
mongodb:
image: 'bitnami/mongodb:4.0'
volumes:
- 'mongodb_data:/bitnami'
parse:
image: 'bitnami/parse:3'
ports:
- '1337:1337'
volumes:
- 'parse_data:/bitnami'
depends_on:
- mongodb
volumes:
mongodb_data:
driver: local
parse_data:
driver: local

View File

@ -1,6 +0,0 @@
#!/bin/bash
useradd -ms /bin/bash bitnami
mkdir -p /opt/bitnami && chown bitnami:bitnami /opt/bitnami
sed -i -e 's/\s*Defaults\s*secure_path\s*=/# Defaults secure_path=/' /etc/sudoers
echo 'bitnami ALL=NOPASSWD: ALL' >> /etc/sudoers

View File

@ -1,6 +0,0 @@
#!/bin/bash
useradd -ms /bin/bash bitnami
mkdir -p /opt/bitnami && chown bitnami:bitnami /opt/bitnami
sed -i -e 's/\s*Defaults\s*secure_path\s*=/# Defaults secure_path=/' /etc/sudoers
echo 'bitnami ALL=NOPASSWD: ALL' >> /etc/sudoers

View File

@ -1,10 +0,0 @@
#!/bin/bash
VERSION="1.11"
SHA256="0b843df6d86e270c5b0f5cbd3c326a04e18f4b7f9b8457fa497b0454c4b138d7"
curl --silent -L "https://github.com/tianon/gosu/releases/download/${VERSION}/gosu-amd64" > "/usr/local/bin/gosu"
echo "$SHA256" "/usr/local/bin/gosu" | sha256sum --check
chmod u+x "/usr/local/bin/gosu"
mkdir -p "/opt/bitnami/licenses"
curl --silent -L "https://raw.githubusercontent.com/tianon/gosu/master/LICENSE" > "/opt/bitnami/licenses/gosu-${VERSION}.txt"

View File

@ -1,7 +0,0 @@
#!/bin/bash
curl --silent -L https://nami-prod.s3.amazonaws.com/tools/nami/releases/nami-1.0.0-1-linux-x64.tar.gz > /tmp/nami-linux-x64.tar.gz
echo "80488279b056d5e9c183fe34097c5f496715ab16a602afcc9f78d59f15139a16 /tmp/nami-linux-x64.tar.gz" | sha256sum --check
mkdir -p /opt/bitnami/nami /opt/bitnami/licenses
tar xzf /tmp/nami-linux-x64.tar.gz --strip 1 -C /opt/bitnami/nami && rm /tmp/nami-linux-x64.tar.gz
curl --silent -L https://raw.githubusercontent.com/bitnami/nami/master/COPYING > /opt/bitnami/licenses/nami-1.0.0-1.txt

View File

@ -1,17 +0,0 @@
#!/bin/bash
GPG_KEY="595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7"
GPG_KEY_FINGERPRINT="6380 DC42 8747 F6C3 93FE ACA5 9A84 159D 7001 A4E5"
SERVERS=("ha.pool.sks-keyservers.net" "hkp://p80.pool.sks-keyservers.net:80" "keyserver.ubuntu.com" "hkp://keyserver.ubuntu.com:80" "pgp.mit.edu")
VERSION="0.13.2"
for server in "${SERVERS[@]}"; do
gpg --keyserver "$server" --recv-keys "$GPG_KEY" && break || :
done
gpg --fingerprint "$GPG_KEY" | grep -q "$GPG_KEY_FINGERPRINT"
curl --silent -L "https://github.com/krallin/tini/releases/download/v${VERSION}/tini.asc" > "/tmp/tini.asc"
curl --silent -L "https://github.com/krallin/tini/releases/download/v${VERSION}/tini" > "/usr/local/bin/tini"
gpg --verify "/tmp/tini.asc" "/usr/local/bin/tini"
chmod +x "/usr/local/bin/tini"
mkdir -p "/opt/bitnami/licenses"
curl --silent -L "https://raw.githubusercontent.com/krallin/tini/master/LICENSE" > "/opt/bitnami/licenses/tini-${VERSION}.txt"

View File

@ -1,7 +0,0 @@
#!/bin/bash
curl --silent -L https://nami-prod.s3.amazonaws.com/tools/nami/releases/nami-1.0.0-1-linux-x64.tar.gz > /tmp/nami-linux-x64.tar.gz
echo "80488279b056d5e9c183fe34097c5f496715ab16a602afcc9f78d59f15139a16 /tmp/nami-linux-x64.tar.gz" | sha256sum --check
mkdir -p /opt/bitnami/nami /opt/bitnami/licenses
tar xzf /tmp/nami-linux-x64.tar.gz --strip 1 -C /opt/bitnami/nami && rm /tmp/nami-linux-x64.tar.gz
curl --silent -L https://raw.githubusercontent.com/bitnami/nami/master/COPYING > /opt/bitnami/licenses/nami-1.0.0-1.txt

View File

@ -1,121 +0,0 @@
#!/bin/bash
[[ ${BASH_DEBUG:-false} = true ]] && set -x
# Constants
MODULE="$(basename "$0")"
BITNAMI_PREFIX=/opt/bitnami
# Color Palette
RESET='\033[0m'
BOLD='\033[1m'
## Foreground
BLACK='\033[38;5;0m'
RED='\033[38;5;1m'
GREEN='\033[38;5;2m'
YELLOW='\033[38;5;3m'
BLUE='\033[38;5;4m'
MAGENTA='\033[38;5;5m'
CYAN='\033[38;5;6m'
WHITE='\033[38;5;7m'
## Background
ON_BLACK='\033[48;5;0m'
ON_RED='\033[48;5;1m'
ON_GREEN='\033[48;5;2m'
ON_YELLOW='\033[48;5;3m'
ON_BLUE='\033[48;5;4m'
ON_MAGENTA='\033[48;5;5m'
ON_CYAN='\033[48;5;6m'
ON_WHITE='\033[48;5;7m'
# Functions
########################
# Print to STDERR
# Arguments:
# Message to print
# Returns:
# None
#########################
stderr_print() {
printf "%b\\n" "${*}" >&2
}
########################
# Log message
# Arguments:
# Message to log
# Returns:
# None
#########################
log() {
stderr_print "${NAMI_DEBUG:+${CYAN}${MODULE:-} ${MAGENTA}$(date "+%T.%2N ")}${RESET}${*}"
}
########################
# Log an 'info' message
# Arguments:
# Message to log
# Returns:
# None
#########################
info() {
log "${GREEN}INFO ${RESET} ==> ${*}"
}
########################
# Log message
# Arguments:
# Message to log
# Returns:
# None
#########################
warn() {
log "${YELLOW}WARN ${RESET} ==> ${*}"
}
########################
# Log an 'error' message
# Arguments:
# Message to log
# Returns:
# None
#########################
error() {
log "${RED}ERROR${RESET} ==> ${*}"
}
########################
# Print the welcome page
# Globals:
# DISABLE_WELCOME_MESSAGE
# BITNAMI_APP_NAME
# Arguments:
# None
# Returns:
# None
#########################
print_welcome_page() {
if [[ -z "${DISABLE_WELCOME_MESSAGE:-}" ]]; then
if [[ -n "$BITNAMI_APP_NAME" ]]; then
print_image_welcome_page
fi
fi
}
########################
# Print the welcome page for a Bitnami Docker image
# Globals:
# BITNAMI_APP_NAME
# Arguments:
# None
# Returns:
# None
#########################
print_image_welcome_page() {
local github_url="https://github.com/bitnami/bitnami-docker-${BITNAMI_APP_NAME}"
log ""
log "${BOLD}Welcome to the Bitnami ${BITNAMI_APP_NAME} container${RESET}"
log "Subscribe to project updates by watching ${BOLD}${github_url}${RESET}"
log "Submit issues and feature requests at ${BOLD}${github_url}/issues${RESET}"
log "Send us your feedback at ${BOLD}containers@bitnami.com${RESET}"
log ""
}

View File

@ -1,40 +0,0 @@
#!/bin/bash
. /opt/bitnami/base/functions
########################
# Helper function to initialize a single nami module
# Arguments:
# Module to initialize
# Returns:
# None
# Description:
# Initialize an unpacked nami module with the `nami initialize` command.
# Command arguments can be specified as function argumnts after the module name.
# `--log-level trace` flag is added to the command if `NAMI_DEBUG` env variable exists.
# The log level can be overriden using the `NAMI_LOG_LEVEL` env variable.
#########################
nami_initialize_one() {
local module="${1:?module not specified}"
if nami inspect $module | grep -q '"lifecycle": "unpacked"'; then
local inputs=
if [[ -f "/${module}-inputs.json" ]]; then
inputs="--inputs-file=/${module}-inputs.json"
fi
nami ${NAMI_DEBUG:+--log-level ${NAMI_LOG_LEVEL:-trace}} initialize $module $inputs "${@:2}"
fi
}
########################
# Helper function to initialize one or more nami modules
# Arguments:
# Module to initialize
# Returns:
# None
#########################
nami_initialize() {
local module="${1:?module not specified}"
for module in "${@}"; do
nami_initialize_one $module
done
}

View File

@ -1,211 +0,0 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
print_usage() {
log "Usage: bitnami-pkg <COMMAND> <PACKAGE>-<VERSION> [OPTIONS] -- [ARGS]"
log ""
log "Download and install Bitnami packages"
log ""
log "Commands:"
log " install Download and install a package."
log " unpack Download and unpack a package."
log ""
log "Options:"
log " -b, --bucket Package release bucket (default: stacksmith)."
log " -c, --checksum SHA256 verification checksum."
log " -h, --help Show this help message and exit."
log ""
log "If the package is already available in the /tmp/bitnami/pkg/cache/"
log "directory, the download will be skipped. If there is a corresponding"
log "file of the same name post-fixed with .sha256 in the directory,"
log "that sha will be used instead of the --checksum option."
log ""
log "Examples:"
log " - Unpack package"
log " \$ bitnami-pkg unpack nginx-1.9.10-0"
log ""
log " - Verify and Install package"
log " \$ bitnami-pkg install nginx-1.9.10-0 --checksum 15565d06b18c2e3710fc08e579ddb3d0e39aa663264a0f7404f0743cb4cdb58d"
log ""
log " - Install package with arguments"
log " \$ bitnami-pkg install mariadb-10.1.11-0 -- --password bitnami"
log ""
log " - Install package from testing"
log " \$ bitnami-pkg install mariadb-10.1.11-0 --bucket testing"
log ""
}
identify_distro() {
distro="${IMAGE_OS:-unknown}"
if [ "${distro}" == "unknown" -a -f /etc/os-release ]; then
distro="$(grep "^ID=" /etc/os-release | cut -d'=' -f2 | cut -d'"' -f2)-$(grep "^VERSION_ID=" /etc/os-release | cut -d'=' -f2 | cut -d'"' -f2 | cut -d'.' -f1)"
fi
echo "$distro"
}
identify_arch() {
local arch=$(uname -m)
case "${arch}" in
ppc64le)
;; # no-op
x86_64)
case $(identify_distro) in
debian-*)
arch=amd64
;;
ol-*)
arch=x86_64
;;
centos-*)
arch=x86_64
;;
rhel-*)
arch=x86_64
;;
photon-*)
arch=x86_64
;;
esac
;;
*)
arch="unknown"
;;
esac
echo $arch
}
# break up command line for easy parsing and check legal options
ARGS=$(getopt -o b:c:h -l "bucket:,checksum:,help" -n "bitnami-pkg" -- "$@")
if [ $? -ne 0 ];
then
exit 1
fi
eval set -- "$ARGS";
while true; do
case "$1" in
-b|--bucket)
shift
if [ -n "$1" ]; then
RELEASE_BUCKET=$1
shift
fi
;;
-c|--checksum)
shift
if [ -n "$1" ]; then
PACKAGE_SHA256=$1
shift
fi
;;
-h|--help)
print_usage
exit 0
;;
--)
shift
break
;;
esac
done
# weed out unrecognized commands
case "$1" in
install|unpack) ;;
*)
error "Unrecognized command: $1"
print_usage
exit 1
;;
esac
# install/unpack command need to be supplied a package name
if [ $# -lt 2 ]; then
print_usage
exit 1
fi
INSTALL_ROOT=/tmp/bitnami/pkg/install
CACHE_ROOT=/tmp/bitnami/pkg/cache
PACKAGE="$2-linux-$(identify_arch)-$(identify_distro)"
PACKAGE_ARGS=${@:3}
PACKAGE_NAME=$(echo $PACKAGE | sed 's/-[0-9].*//')
RELEASE_BUCKET=${RELEASE_BUCKET:-stacksmith}
mkdir -p $INSTALL_ROOT
cd $INSTALL_ROOT
info "Downloading $PACKAGE package"
if [ -f $CACHE_ROOT/$PACKAGE.tar.gz ]; then
info "$CACHE_ROOT/$PACKAGE.tar.gz already exists, skipping download."
cp $CACHE_ROOT/$PACKAGE.tar.gz .
if [ -f $CACHE_ROOT/$PACKAGE.tar.gz.sha256 ]; then
info "Using the local sha256 from $CACHE_ROOT/$PACKAGE.tar.gz.sha256"
PACKAGE_SHA256=$(cat $CACHE_ROOT/$PACKAGE.tar.gz.sha256)
fi
else
# display cURL progress bar when a tty is attached
if tty -s; then
CURL_ARGS="-#"
else
CURL_ARGS="-sS"
fi
if ! curl $CURL_ARGS -LOf "https://downloads.bitnami.com/files/$RELEASE_BUCKET/$PACKAGE.tar.gz"; then
warn "Package name '$PACKAGE' does not exist, will try '${PACKAGE%-$(identify_distro)}'..."
if curl $CURL_ARGS -LOf "https://downloads.bitnami.com/files/$RELEASE_BUCKET/${PACKAGE%-$(identify_distro)}.tar.gz"; then
PACKAGE="${PACKAGE%-$(identify_distro)}"
else
error "Could not find the requested package..."
exit 1
fi
fi
fi
if ! tar tzf $PACKAGE.tar.gz >/dev/null 2>&1; then
error "Invalid or corrupt '$PACKAGE' package."
exit 1
fi
if [ "$PACKAGE_SHA256" ]; then
info "Verifying package integrity"
echo "$PACKAGE_SHA256 $PACKAGE.tar.gz" | sha256sum -c -
fi
# If the tarball has too many files, it can trigger a bug
# in overlayfs when using tar. Install bsdtar in the container image
# to workaround it. As the overhead is too big (~40 MB), it is not added by
# default. Source: https://github.com/coreos/bugs/issues/1095
if which bsdtar > /dev/null; then
bsdtar -xf $PACKAGE.tar.gz
else
tar xzf $PACKAGE.tar.gz
fi
case "$1" in
install) info "Installing $PACKAGE" ;;
unpack) info "Unpacking $PACKAGE" ;;
esac
nami $1 $PACKAGE $PACKAGE_ARGS
rm -rf $INSTALL_ROOT
if [ "$BITNAMI_PKG_EXTRA_DIRS" ]; then
info "Creating extra directories"
for i in ${BITNAMI_PKG_EXTRA_DIRS}; do
mkdir -p $i
done
fi
if [ "$BITNAMI_PKG_CHMOD" ]; then
DIRS="/.nami /bitnami $BITNAMI_PKG_EXTRA_DIRS"
if ! [[ $PACKAGE_NAME =~ .*-client ]]; then
mkdir -p /bitnami/$PACKAGE_NAME
fi
# We need to be in $HOME in order to nami inspect works
cd $HOME
DIRS+=" $(nami inspect $PACKAGE_NAME | grep -e 'installdir' | cut -f4 -d\")"
info "Fixing permissions: chmod $BITNAMI_PKG_CHMOD $DIRS"
chmod $BITNAMI_PKG_CHMOD $DIRS
fi

View File

@ -1,13 +0,0 @@
#!/bin/bash -e
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
print_welcome_page
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$1" == "/run.sh" ]]; then
nami_initialize parse
info "Starting parse... "
fi
exec tini -- "$@"

View File

@ -1,12 +0,0 @@
{
"appId": "{{$global.env.PARSE_APP_ID}}",
"applicationPort": "{{$global.env.PARSE_PORT_NUMBER}}",
"databaseAdminPassword": "{{$global.env.MONGODB_PASSWORD}}",
"databaseAdminUser": "{{$global.env.MONGODB_USER}}",
"databaseServerHost": "{{$global.env.MONGODB_HOST}}",
"databaseServerPort": "{{$global.env.MONGODB_PORT_NUMBER}}",
"enableCloudCode": "{{$global.env.PARSE_ENABLE_CLOUD_CODE}}",
"host": "{{$global.env.PARSE_HOST}}",
"masterKey": "{{$global.env.PARSE_MASTER_KEY}}",
"mountPath": "{{$global.env.PARSE_MOUNT_PATH}}"
}

View File

@ -1,18 +0,0 @@
#!/bin/bash
. /opt/bitnami/base/functions
. /opt/bitnami/base/helpers
USER=parse
DAEMON=parse-server
EXEC=$(which $DAEMON)
START_COMMAND="${EXEC} /opt/bitnami/parse/config.json"
cd /opt/bitnami/parse || exit 1
# If container is started as `root` user
if [ $EUID -eq 0 ]; then
exec gosu "${USER}" bash -c "${START_COMMAND}"
else
exec bash -c "${START_COMMAND}"
fi