mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-30 02:02:36 +00:00
Merge pull request #47 from Telecominfraproject/feature/wifi-10388--versioning
[WIFI-10388] Chg: use Docker build arg to define dependency version
This commit is contained in:
49
Dockerfile
49
Dockerfile
@@ -1,3 +1,8 @@
|
|||||||
|
ARG POCO_VERSION=poco-tip-v1
|
||||||
|
ARG FMTLIB_VERSION=9.0.0
|
||||||
|
ARG CPPKAFKA_VERSION=tip-v1
|
||||||
|
ARG JSON_VALIDATOR_VERSION=2.1.0
|
||||||
|
|
||||||
FROM alpine:3.15 AS build-base
|
FROM alpine:3.15 AS build-base
|
||||||
|
|
||||||
RUN apk add --update --no-cache \
|
RUN apk add --update --no-cache \
|
||||||
@@ -9,8 +14,10 @@ RUN apk add --update --no-cache \
|
|||||||
|
|
||||||
FROM build-base AS poco-build
|
FROM build-base AS poco-build
|
||||||
|
|
||||||
ADD https://api.github.com/repos/AriliaWireless/poco/git/refs/tags/poco-tip-v1 version.json
|
ARG POCO_VERSION
|
||||||
RUN git clone https://github.com/AriliaWireless/poco --branch poco-tip-v1 /poco
|
|
||||||
|
ADD https://api.github.com/repos/AriliaWireless/poco/git/refs/tags/${POCO_VERSION} version.json
|
||||||
|
RUN git clone https://github.com/AriliaWireless/poco --branch ${POCO_VERSION} /poco
|
||||||
|
|
||||||
WORKDIR /poco
|
WORKDIR /poco
|
||||||
RUN mkdir cmake-build
|
RUN mkdir cmake-build
|
||||||
@@ -19,22 +26,12 @@ RUN cmake ..
|
|||||||
RUN cmake --build . --config Release -j8
|
RUN cmake --build . --config Release -j8
|
||||||
RUN cmake --build . --target install
|
RUN cmake --build . --target install
|
||||||
|
|
||||||
FROM build-base AS cppkafka-build
|
|
||||||
|
|
||||||
ADD https://api.github.com/repos/AriliaWireless/cppkafka/git/refs/tags/tip-v1 version.json
|
|
||||||
RUN git clone https://github.com/AriliaWireless/cppkafka --branch tip-v1 /cppkafka
|
|
||||||
|
|
||||||
WORKDIR /cppkafka
|
|
||||||
RUN mkdir cmake-build
|
|
||||||
WORKDIR cmake-build
|
|
||||||
RUN cmake ..
|
|
||||||
RUN cmake --build . --config Release -j8
|
|
||||||
RUN cmake --build . --target install
|
|
||||||
|
|
||||||
FROM build-base AS fmtlib-build
|
FROM build-base AS fmtlib-build
|
||||||
|
|
||||||
ADD https://api.github.com/repos/fmtlib/fmt/git/refs/tags/9.0.0 version.json
|
ARG FMTLIB_VERSION
|
||||||
RUN git clone https://github.com/fmtlib/fmt --branch 9.0.0 /fmtlib
|
|
||||||
|
ADD https://api.github.com/repos/fmtlib/fmt/git/refs/tags/${FMTLIB_VERSION} version.json
|
||||||
|
RUN git clone https://github.com/fmtlib/fmt --branch ${FMTLIB_VERSION} /fmtlib
|
||||||
|
|
||||||
WORKDIR /fmtlib
|
WORKDIR /fmtlib
|
||||||
RUN mkdir cmake-build
|
RUN mkdir cmake-build
|
||||||
@@ -43,10 +40,26 @@ RUN cmake ..
|
|||||||
RUN make
|
RUN make
|
||||||
RUN make install
|
RUN make install
|
||||||
|
|
||||||
|
FROM build-base AS cppkafka-build
|
||||||
|
|
||||||
|
ARG CPPKAFKA_VERSION
|
||||||
|
|
||||||
|
ADD https://api.github.com/repos/AriliaWireless/cppkafka/git/refs/tags/${CPPKAFKA_VERSION} version.json
|
||||||
|
RUN git clone https://github.com/AriliaWireless/cppkafka --branch ${CPPKAFKA_VERSION} /cppkafka
|
||||||
|
|
||||||
|
WORKDIR /cppkafka
|
||||||
|
RUN mkdir cmake-build
|
||||||
|
WORKDIR cmake-build
|
||||||
|
RUN cmake ..
|
||||||
|
RUN cmake --build . --config Release -j8
|
||||||
|
RUN cmake --build . --target install
|
||||||
|
|
||||||
FROM build-base AS json-schema-validator-build
|
FROM build-base AS json-schema-validator-build
|
||||||
|
|
||||||
ADD https://api.github.com/repos/pboettch/json-schema-validator/git/refs/tags/2.1.0 version.json
|
ARG JSON_VALIDATOR_VERSION
|
||||||
RUN git clone https://github.com/pboettch/json-schema-validator --branch 2.1.0 /json-schema-validator
|
|
||||||
|
ADD https://api.github.com/repos/pboettch/json-schema-validator/git/refs/tags/${JSON_VALIDATOR_VERSION} version.json
|
||||||
|
RUN git clone https://github.com/pboettch/json-schema-validator --branch ${JSON_VALIDATOR_VERSION} /json-schema-validator
|
||||||
|
|
||||||
WORKDIR /json-schema-validator
|
WORKDIR /json-schema-validator
|
||||||
RUN mkdir cmake-build
|
RUN mkdir cmake-build
|
||||||
|
|||||||
Reference in New Issue
Block a user