diff --git a/Makefile b/Makefile index 08575d7..c3d7396 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,9 @@ test: clean: rm -f $(MICROSERVICES) +version: + echo -n ${VERSION} + docker: $(DOCKERS) docker_device_grove_c: diff --git a/scripts/Dockerfile.alpine-3.11 b/scripts/Dockerfile.alpine-3.11 index 186ee55..87c1654 100644 --- a/scripts/Dockerfile.alpine-3.11 +++ b/scripts/Dockerfile.alpine-3.11 @@ -5,14 +5,15 @@ RUN apk add --update --no-cache build-base git gcc cmake make linux-headers yaml COPY scripts /device-grove/scripts COPY src /device-grove/src/ -COPY VERSION /device-grove +COPY Makefile /device-grove/Makefile +RUN cd /device-grove && make -s version | tee /device-grove/VERSION && rm -f /device-grove/Makefile RUN mkdir -p /device-grove/build WORKDIR /device-grove RUN /device-grove/scripts/build_deps.sh 1 RUN /device-grove/scripts/build.sh -FROM alpine:3.9 +FROM alpine:3.11 RUN apk add --update --no-cache linux-headers yaml libmicrohttpd curl libuuid diff --git a/scripts/Dockerfile.alpine-3.11-base b/scripts/Dockerfile.alpine-3.11-base index 51c670a..5830c2d 100644 --- a/scripts/Dockerfile.alpine-3.11-base +++ b/scripts/Dockerfile.alpine-3.11-base @@ -5,7 +5,8 @@ RUN apk add --update --no-cache build-base git gcc cmake make linux-headers yaml COPY scripts /device-grove/scripts COPY src /device-grove/src/ -COPY VERSION /device-grove +COPY Makefile /device-grove/Makefile +RUN cd /device-grove && make -s version | tee /device-grove/VERSION && rm -f /device-grove/Makefile RUN mkdir -p /device-grove/build WORKDIR /device-grove