forked from pool/rmt-server-image
Compare commits
17 Commits
Author | SHA256 | Date | |
---|---|---|---|
|
e0eaa54784 | ||
557fb129b4 | |||
|
c7b7f6e314 | ||
e5874f04ac | |||
|
cb8785ee81 | ||
5b9a275756 | |||
|
77e76f281d | ||
|
04f9913e79 | ||
ce9830e206 | |||
e1125062db | |||
|
8dcb168ec0 | ||
577c1b5ca0 | |||
|
6688dcfa6a | ||
22533f29d2 | |||
6020e4d4d6 | |||
|
378fd5f0b0 | ||
8386ae3cb2 |
11
Dockerfile
11
Dockerfile
@ -1,6 +1,6 @@
|
|||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
# Copyright (c) 2024 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
|
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -13,18 +13,21 @@
|
|||||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
|
# You can contact the BCI team via https://github.com/SUSE/bci/discussions
|
||||||
|
|
||||||
|
#!UseOBSRepositories
|
||||||
|
|
||||||
#!BuildTag: opensuse/rmt-server:%%rmt_version%%
|
|
||||||
#!BuildTag: opensuse/rmt-server:%%rmt_version%%-%RELEASE%
|
#!BuildTag: opensuse/rmt-server:%%rmt_version%%-%RELEASE%
|
||||||
|
#!BuildTag: opensuse/rmt-server:%%rmt_version%%
|
||||||
#!BuildTag: opensuse/rmt-server:latest
|
#!BuildTag: opensuse/rmt-server:latest
|
||||||
|
|
||||||
FROM opensuse/tumbleweed:latest
|
FROM opensuse/tumbleweed:latest
|
||||||
|
|
||||||
RUN set -euo pipefail; zypper -n in --no-recommends rmt-server catatonit; zypper -n clean; rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2}
|
RUN set -euo pipefail; \
|
||||||
|
zypper -n install --no-recommends rmt-server catatonit bash; \
|
||||||
|
zypper -n clean; \
|
||||||
|
rm -rf {/target,}/var/log/{alternatives.log,lastlog,tallylog,zypper.log,zypp/history,YaST2}
|
||||||
|
|
||||||
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
# Define labels according to https://en.opensuse.org/Building_derived_containers
|
||||||
# labelprefix=org.opensuse.application.rmt-server
|
# labelprefix=org.opensuse.application.rmt-server
|
||||||
LABEL org.opencontainers.image.authors="openSUSE (https://www.opensuse.org/)"
|
|
||||||
LABEL org.opencontainers.image.title="openSUSE Tumbleweed SUSE RMT server"
|
LABEL org.opencontainers.image.title="openSUSE Tumbleweed SUSE RMT server"
|
||||||
LABEL org.opencontainers.image.description="SUSE RMT server container based on the openSUSE Tumbleweed Base Container Image."
|
LABEL org.opencontainers.image.description="SUSE RMT server container based on the openSUSE Tumbleweed Base Container Image."
|
||||||
LABEL org.opencontainers.image.version="%%rmt_version%%"
|
LABEL org.opencontainers.image.version="%%rmt_version%%"
|
||||||
|
2
_service
2
_service
@ -1,7 +1,7 @@
|
|||||||
<services>
|
<services>
|
||||||
<service mode="buildtime" name="docker_label_helper"/>
|
<service mode="buildtime" name="docker_label_helper"/>
|
||||||
<service mode="buildtime" name="kiwi_metainfo_helper"/>
|
<service mode="buildtime" name="kiwi_metainfo_helper"/>
|
||||||
<service name="replace_using_package_version" mode="buildtime">
|
<service mode="buildtime" name="replace_using_package_version">
|
||||||
<param name="file">Dockerfile</param>
|
<param name="file">Dockerfile</param>
|
||||||
<param name="regex">%%rmt_version%%</param>
|
<param name="regex">%%rmt_version%%</param>
|
||||||
<param name="package">rmt-server</param>
|
<param name="package">rmt-server</param>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# PV could be empty, make sure the directories exist
|
# PV could be empty, make sure the directories exist
|
||||||
@ -23,30 +23,46 @@ MYSQL_USER="${MYSQL_USER:-rmt}"
|
|||||||
SCC_SYNC="${SCC_SYNC:-true}"
|
SCC_SYNC="${SCC_SYNC:-true}"
|
||||||
|
|
||||||
# Create adjusted /etc/rmt.conf
|
# Create adjusted /etc/rmt.conf
|
||||||
echo -e "database:\n host: ${MYSQL_HOST}\n database: ${MYSQL_DATABASE}\n username: ${MYSQL_USER}\n password: ${MYSQL_PASSWORD}" > /etc/rmt.conf
|
cat > /etc/rmt.conf <<EOF
|
||||||
echo -e " adapter: mysql2\n encoding: utf8\n timeout: 5000\n pool: 5\n" >> /etc/rmt.conf
|
database:
|
||||||
echo -e "scc:\n username: ${SCC_USERNAME}\n password: ${SCC_PASSWORD}\n sync_systems: true\n scc_sync: ${SCC_SYNC}\n" >> /etc/rmt.conf
|
host: ${MYSQL_HOST}
|
||||||
echo -e "log_level:\n rails: debug" >> /etc/rmt.conf
|
database: ${MYSQL_DATABASE}
|
||||||
|
username: ${MYSQL_USER}
|
||||||
|
password: ${MYSQL_PASSWORD}
|
||||||
|
adapter: mysql2
|
||||||
|
encoding: utf8
|
||||||
|
timeout: 5000
|
||||||
|
pool: 5
|
||||||
|
|
||||||
|
scc:
|
||||||
|
username: ${SCC_USERNAME}
|
||||||
|
password: ${SCC_PASSWORD}
|
||||||
|
sync_systems: true
|
||||||
|
scc_sync: ${SCC_SYNC}
|
||||||
|
|
||||||
|
log_level:
|
||||||
|
rails: debug
|
||||||
|
EOF
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
set -- /usr/share/rmt/bin/rails server -e production
|
set -- /usr/share/rmt/bin/rails server -e production
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" == "/usr/share/rmt/bin/rails" -a "$2" == "server" ]; then
|
if [ "$1" = "/usr/share/rmt/bin/rails" ] && [ "$2" = "server" ]; then
|
||||||
echo "Create/migrate SUSE RMT database"
|
echo "Create/migrate SUSE RMT database"
|
||||||
pushd /usr/share/rmt > /dev/null
|
pushd /usr/share/rmt > /dev/null
|
||||||
/usr/share/rmt/bin/rails db:create db:migrate RAILS_ENV=production
|
/usr/share/rmt/bin/rails db:create db:migrate RAILS_ENV=production
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
if [ ${SCC_SYNC} == "true" ]; then
|
if [ "${SCC_SYNC}" = "true" ]; then
|
||||||
echo "Syncing product list"
|
echo "Syncing product list"
|
||||||
rmt-cli sync
|
rmt-cli sync
|
||||||
for PRODUCT in $SCC_PRODUCT_ENABLE
|
for PRODUCT in $SCC_PRODUCT_ENABLE
|
||||||
do
|
do
|
||||||
rmt-cli products enable $PRODUCT
|
rmt-cli products enable "$PRODUCT"
|
||||||
done
|
done
|
||||||
for PRODUCT in $SCC_PRODUCT_DISABLE
|
for PRODUCT in $SCC_PRODUCT_DISABLE
|
||||||
do
|
do
|
||||||
rmt-cli products disable $PRODUCT
|
rmt-cli products disable "$PRODUCT"
|
||||||
done
|
done
|
||||||
rmt-cli repos clean
|
rmt-cli repos clean
|
||||||
fi
|
fi
|
||||||
|
@ -1,3 +1,48 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 1 14:13:48 UTC 2025 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- update copyright year
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 3 13:26:37 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- Change attribute order in _service
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 31 16:24:36 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- entry point refactoring
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 30 15:34:45 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- remove nonsensical org.opencontainers.image.authors - duplication of .vendor
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 30 12:48:04 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- Add missing space to rmt.conf, fixes bsc#1230404
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 11 15:12:52 UTC 2024 - SUSE Update Bot <bci-internal@suse.de>
|
||||||
|
|
||||||
|
- make the tag with -%RELEASE% the first tag listed
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 25 17:36:16 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- rerender installation step in multiple lines, allow uninstalling optional packages
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 25 17:12:11 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- improved log cleaning
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 12 10:37:22 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- set useobsrepositories explicitly
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Aug 18 13:32:24 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
Sun Aug 18 13:32:24 UTC 2024 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user