Skip to content

Commit b4f17ac

Browse files
committed
feat: add deps script
1 parent 033e73c commit b4f17ac

File tree

3 files changed

+26
-5
lines changed

3 files changed

+26
-5
lines changed

tengine/Containerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ RUN ./scripts/build.sh ${BUILD_TYPE} ${VERSION}
88

99
FROM debian:stable-slim
1010

11-
RUN apt-get update && apt-get install -y \
12-
libpcre3 libpcre3-dev \
13-
libssl3 libssl-dev
14-
1511
COPY --from=build /usr/local/nginx /usr/local/nginx
12+
COPY --from=build /src/scripts/deps.sh .
13+
14+
RUN ./deps.sh ${BUILD_TYPE} && rm ./deps.sh
1615

1716
ENV PATH="/usr/local/nginx/sbin:$PATH"
1817

tengine/scripts/build.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
BUILD_TYPE=$1
44
VERSION=$2
55

6-
echo "[INFO] build type '${BUILD_TYPE}'; version '${VERSION}'"
6+
set -x
77

8+
echo "[INFO] build type '${BUILD_TYPE}'; version '${VERSION}'"
89

910
if [ -z "${BUILD_TYPE}" ]; then
1011
echo "[ERROR] build type or version empty; Usage: ./build.sh <build-type> <version>"

tengine/scripts/deps.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env sh
2+
3+
BUILD_TYPE=$1
4+
5+
echo "[INFO] build type '${BUILD_TYPE}'"
6+
7+
8+
if [ -z "${BUILD_TYPE}" ]; then
9+
echo "[ERROR] build type empty; Usage: ./deps.sh <build-type>"
10+
exit 1
11+
fi
12+
13+
apt-get update
14+
15+
if [ "${BUILD_TYPE}" = "simple" ]; then
16+
apt-get install --yes libpcre3 libpcre3-dev libssl3 libssl-dev
17+
fi
18+
19+
if [ "${BUILD_TYPE}" = "min" ]; then
20+
apt-get install --yes libpcre3 libpcre3-dev libssl3 libssl-dev
21+
fi

0 commit comments

Comments
 (0)