Skip to content

Commit

Permalink
Dockerfile changes
Browse files Browse the repository at this point in the history
  • Loading branch information
tmp64 committed Dec 4, 2023
1 parent 1e49f55 commit c56d720
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
10 changes: 7 additions & 3 deletions Dockerfile.linux
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM bhl-build

ARG BHL_VER_TAG="dev"

# Install build script dependencies
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
Expand All @@ -19,20 +21,22 @@ WORKDIR /build/bhl
COPY . .

# Refresh Git index after .git is copied
RUN git update-index --refresh
RUN git update-index -q --refresh

RUN python3.8 ./scripts/BuildRelease.py \
--target client \
--build-type release \
--vs 2019 --toolset v141_xp \
--linux-compiler gcc-9 \
--out-dir ./_build_out_client \
--cmake-args="-DWARNINGS_ARE_ERRORS=ON"
--cmake-args="-DWARNINGS_ARE_ERRORS=ON" \
--v-tag=${BHL_VER_TAG}

RUN python3.8 ./scripts/BuildRelease.py \
--target server \
--build-type release \
--vs 2019 --toolset v141_xp \
--linux-compiler gcc-9 \
--out-dir ./_build_out_server \
--cmake-args="-DWARNINGS_ARE_ERRORS=ON"
--cmake-args="-DWARNINGS_ARE_ERRORS=ON" \
--v-tag=${BHL_VER_TAG}
10 changes: 7 additions & 3 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
FROM bhl-build

ARG BHL_VER_TAG="dev"

# Build
WORKDIR /build/bhl
COPY . .

# Refresh Git index after .git is copied
RUN git update-index --refresh
RUN git update-index -q --refresh

RUN python ./scripts/BuildRelease.py \
--target client \
--build-type release \
--vs 2022 --toolset v143 \
--linux-compiler gcc-9 \
--out-dir ./_build_out_client \
--cmake-args=-DWARNINGS_ARE_ERRORS=ON
--cmake-args=-DWARNINGS_ARE_ERRORS=ON \
--v-tag=${env:BHL_VER_TAG}

RUN python ./scripts/BuildRelease.py \
--target server \
--build-type release \
--vs 2022 --toolset v143 \
--linux-compiler gcc-9 \
--out-dir ./_build_out_server \
--cmake-args=-DWARNINGS_ARE_ERRORS=ON
--cmake-args=-DWARNINGS_ARE_ERRORS=ON \
--v-tag=${env:BHL_VER_TAG}
2 changes: 1 addition & 1 deletion containers/linux/build-bhl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OUT_DIR="$CUR_DIR/out/bhl"
cd ../..
mkdir -p $OUT_DIR

docker buildx build -f $DOCKERFILE -t $IMAGE_TAG .
docker buildx build -f $DOCKERFILE -t $IMAGE_TAG --build-arg BHL_VER_TAG .
docker container create --name $TEMP_CONT $IMAGE_TAG
docker container cp ${TEMP_CONT}:/build/bhl/_build_out_client/. $OUT_DIR
docker container cp ${TEMP_CONT}:/build/bhl/_build_out_server/. $OUT_DIR
Expand Down
2 changes: 1 addition & 1 deletion containers/windows/build-bhl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cd ../..
rm -r -fo -ea 0 $OutDir
mkdir $OutDir -ea 0

Invoke-Call -ScriptBlock { docker build -f $DockerFile -t $ImageTag . }
Invoke-Call -ScriptBlock { docker build -f $DockerFile -t $ImageTag --build-arg BHL_VER_TAG . }
Invoke-Call -ScriptBlock { docker container create --name $TempCont $ImageTag }
Invoke-Call -ScriptBlock { docker container cp ${TempCont}:C:/build/bhl/_build_out_client $OutDir }
Invoke-Call -ScriptBlock { docker container cp ${TempCont}:C:/build/bhl/_build_out_server $OutDir }
Expand Down

0 comments on commit c56d720

Please sign in to comment.