The default user is Admin:opensuse and the docker compose opens only one port at 3737 running the api/webui This can be used for CI on sources or to build against it with osc (if you add interconnect project), but it won't build packages
32 lines
1.4 KiB
Docker
32 lines
1.4 KiB
Docker
#!BuildTag: osrt_miniobs
|
|
FROM opensuse-leap-15.0:current
|
|
|
|
RUN zypper ar http://download.opensuse.org/repositories/OBS:/Server:/Unstable/openSUSE_15.0/ 'O:S:U'; \
|
|
zypper --gpg-auto-import-keys refresh
|
|
|
|
RUN zypper install -y obs-api obs-worker obs-server \
|
|
ca-certificates patch vim vim-data psmisc timezone \
|
|
glibc-locale aaa_base aaa_base-extras netcat net-tools
|
|
|
|
COPY database.yml.local /srv/www/obs/api/config/database.yml
|
|
|
|
RUN /usr/lib/mysql/mysql-systemd-helper install ;\
|
|
sed -e 's,127.0.0.1,0.0.0.0,' -i /etc/my.cnf ;\
|
|
sed -e 's,server-id,skip-grant-tables,' -i /etc/my.cnf ;\
|
|
/usr/lib/mysql/mysql-systemd-helper start & \
|
|
/usr/lib/mysql/mysql-systemd-helper wait ;\
|
|
/usr/bin/mysql -u root -e "SELECT @@version; CREATE USER 'root'@'%' IDENTIFIED BY 'opensuse'; GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;" ;\
|
|
chroot --userspec=wwwrun / /bin/bash -c "cd /srv/www/obs/api && DISABLE_DATABASE_ENVIRONMENT_CHECK=1 RAILS_ENV=production bundle exec rails db:create db:setup" ;\
|
|
mysqladmin shutdown
|
|
|
|
COPY config.yml /srv/www/obs/api/config/options.yml
|
|
COPY database.yml /srv/www/obs/api/config/database.yml
|
|
|
|
RUN sed -i -e 's,\(config.public_file_server.enabled\).*,\1 = true,; s,\(config.log_level\).*,\1 = :debug,' \
|
|
/srv/www/obs/api/config/environments/production.rb
|
|
RUN rm -f /srv/www/obs/api/tmp/pids/server.pid
|
|
|
|
COPY BSConfig.pm.patch /tmp
|
|
RUN patch /usr/lib/obs/server/BSConfig.pm /tmp/BSConfig.pm.patch
|
|
|