Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Mar 4, 2023. It is now read-only.
/QtDataSyncPublic archive

Commitaeddbfa

Browse files
committed
fix docker build (use alpine again) [skip ci]
1 parent21f2c9c commitaeddbfa

File tree

2 files changed

+22
-60
lines changed

2 files changed

+22
-60
lines changed

‎Dockerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
#LABEL maintainer="skycoder42.de@gmx.de"
2-
FROMdebian:latest
2+
FROMalpine:latest
33

44
COPY . /tmp/src
55
RUN /tmp/src/tools/appserver/dockerbuild/install.sh
66

7-
# create env vars & ready for usage
8-
ENV QDSAPP_CONFIG_FILE=/etc/qdsapp.conf
9-
# must be set: ENV QDSAPP_DATABASE_HOST=
10-
ENV QDSAPP_DATABASE_PORT=5432
11-
ENV QDSAPP_DATABASE_USER=postgres
12-
# must be set: ENV QDSAPP_DATABASE_PASSWORD=
13-
ENV QDSAPP_DATABASE_NAME=$QDSAPP_DATABASE_USER
14-
7+
ENV QDSAPP_CONFIG_FILE=/etc/qdsapp.conf \
8+
QDSAPP_DATABASE_HOST= \
9+
QDSAPP_DATABASE_PORT=5432 \
10+
QDSAPP_DATABASE_USER=postgres \
11+
QDSAPP_DATABASE_PASSWORD= \
12+
QDSAPP_DATABASE_NAME=postgres
1513
CMD ["/usr/bin/env_start.sh"]

‎tools/appserver/dockerbuild/install.sh

Lines changed: 15 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,39 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
set -ex
33

44
export MAKEFLAGS=-j$(nproc)
55
export QDEP_CACHE_DIR=/tmp/qdep-cache
66

77
DS_NAME=qdsappd
8-
QT_VERSION_TAG=v5.12.1
9-
MAIN_DEP="libssl1.1 zlib1g libdbus-1-3 libc6 libglib2.0-0 libudev1 libpcre2-16-0 libpq5 libdouble-conversion1 libicu57 libinput10 ca-certificates"
10-
DEV_DEP="openssl libssl-dev zlib1g-dev dbus libdbus-1-dev libc6-dev libglib2.0-dev libudev-dev libdouble-conversion-dev libicu-dev libpcre2-dev libpq-dev libinput-dev make gcc g++ curl python3 python3-pip git perl gawk"
8+
MAIN_DEP="qt5-qtbase qt5-qtbase-postgresql qt5-qtwebsockets icu-libs"
9+
DEV_DEP="qt5-qtbase-dev qt5-qtwebsockets-dev qt5-qttools qt5-qttools-dev icu-dev build-base python3 git perl gawk"
1110
PIP_DEV_DEPS="qdep appdirs lockfile argcomplete"
1211

1312
if [!-d"/tmp/src/.git" ];then
1413
echo"Failed to find .git directory - not supported!"
1514
exit 1
1615
fi
1716

18-
apt-get -qq update
19-
apt-get -qq install --no-install-recommends$MAIN_DEP$DEV_DEP
17+
apk add --no-cache$MAIN_DEP$DEV_DEP
2018
pip3 install$PIP_DEV_DEPS
2119

22-
mkdir /tmp/sysbuild
23-
cd /tmp/sysbuild
24-
25-
# build qt
26-
git clone --depth 1 https://code.qt.io/qt/qt5.git ./qt5 --branch$QT_VERSION_TAG
27-
cd qt5
28-
./init-repository --module-subset="qtbase,qtwebsockets,qttools"
29-
_qt5_prefix=/usr/lib/qt5
30-
_qt5_datadir=/usr/share/qt5
31-
./configure -confirm-license -opensource \
32-
-prefix /usr \
33-
-archdatadir"$_qt5_prefix" \
34-
-datadir"$_qt5_prefix" \
35-
-importdir"$_qt5_prefix"/imports \
36-
-libexecdir"$_qt5_prefix"/libexec \
37-
-plugindir"$_qt5_prefix"/plugins \
38-
-translationdir"$_qt5_datadir"/translations \
39-
-sysconfdir /etc/xdg \
40-
-release -reduce-exports \
41-
-make libs -make tools \
42-
-glib \
43-
-no-rpath \
44-
-no-separate-debug-info \
45-
-openssl-linked \
46-
-plugin-sql-psql \
47-
-dbus-linked \
48-
-system-pcre \
49-
-system-zlib \
50-
-no-reduce-relocations \
51-
-no-gui -no-widgets -no-feature-accessibility -no-feature-dom
52-
make> /dev/null
53-
make install
54-
cd ..
55-
5620
# prepare qdep
57-
qdep prfgen
21+
qdep prfgen --qmake qmake-qt5
5822

5923
# build json serializer, qtservice
24+
mkdir /tmp/sysbuild
25+
cd /tmp/sysbuild
6026
forrepoin QtJsonSerializer QtService;do
6127
git clone https://github.com/Skycoder42/$repo.git ./$repo
6228
cd$repo
63-
latesttag=$(git describe --tags --abbrev=0)
64-
echo checking out${latesttag}
65-
git checkout${latesttag}
29+
git checkout$(git describe --tags --abbrev=0)
6630

67-
if [[-f src/imports/imports.pro]];then
31+
if [-f src/imports/imports.pro ];then
6832
echo"SUBDIRS -= imports">> src/src.pro
6933
fi
7034

71-
qmake
72-
make> /dev/null
35+
qmake-qt5
36+
make
7337
make install
7438
cd ..
7539
done
@@ -80,22 +44,22 @@ echo "SUBDIRS = 3rdparty messages" >> src/src.pro
8044
echo"SUBDIRS =">> examples/examples.pro
8145
echo"SUBDIRS =">> tests/tests.pro
8246

83-
qmake
47+
qmake-qt5
8448
make qmake_all
8549
make
8650
make install
8751

8852
#create special symlinks, dirs and move the env script
8953
mkdir -p /etc/$DS_NAME
90-
ln -s$(qmake -query QT_INSTALL_BINS)/$DS_NAME /usr/bin/$DS_NAME||true#allow to fail if already exists
54+
ln -s$(qmake-qt5 -query QT_INSTALL_BINS)/$DS_NAME /usr/bin/$DS_NAME||true#allow to fail if already exists
9155
mv /tmp/src/tools/appserver/dockerbuild/env_start.sh /usr/bin/
9256

9357
# test if working
9458
/usr/bin/$DS_NAME --version
9559

9660
# remove unused stuff
97-
pip3 uninstall$PIP_DEV_DEPS
98-
apt-get -qq autoremove--purge$DEV_DEP
61+
pip3 uninstall-y$PIP_DEV_DEPS
62+
apk del --no-cache--purge"*-dev"$DEV_DEP
9963
rm -rf /tmp/*
10064
rm -rf$HOME/.cache/qpmx
10165
rm -rf /usr/local/bin/qpm

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp