Skip to content

Commit

Permalink
Dockerfile: avoid usage errors
Browse files Browse the repository at this point in the history
  • Loading branch information
r00t- committed Nov 28, 2024
1 parent b936b96 commit 042e118
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@

# this Dockerfile is expected to run with a checkout
# of the vzlogger source as the build context (working directory),
# which it will copy into the container and then build.

############################
# STEP 1 build executable binary
############################

FROM alpine:latest as builder

COPY . /vzlogger
# ensure we error early if there is no source in the build context
COPY CMakeLists.txt /vzlogger/

RUN apk add --no-cache \
gcc \
g++ \
Expand Down Expand Up @@ -37,8 +46,6 @@ RUN git clone https://github.com/rscada/libmbus.git --depth 1 \
&& ./build.sh \
&& make install

COPY . /vzlogger

ARG build_test=off
RUN cmake -DBUILD_TEST=${build_test} \
&& make -j $(nproc --all || echo 1) \
Expand Down

0 comments on commit 042e118

Please sign in to comment.