File tree Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -8,11 +8,10 @@ RUN ./scripts/build.sh ${BUILD_TYPE} ${VERSION}
8
8
9
9
FROM debian:stable-slim
10
10
11
- RUN apt-get update && apt-get install -y \
12
- libpcre3 libpcre3-dev \
13
- libssl3 libssl-dev
14
-
15
11
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
16
15
17
16
ENV PATH="/usr/local/nginx/sbin:$PATH"
18
17
Original file line number Diff line number Diff line change 3
3
BUILD_TYPE=$1
4
4
VERSION=$2
5
5
6
- echo " [INFO] build type ' ${BUILD_TYPE} '; version ' ${VERSION} ' "
6
+ set -x
7
7
8
+ echo " [INFO] build type '${BUILD_TYPE} '; version '${VERSION} '"
8
9
9
10
if [ -z " ${BUILD_TYPE} " ]; then
10
11
echo " [ERROR] build type or version empty; Usage: ./build.sh <build-type> <version>"
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments