Skip to content

Commit dc79611

Browse files
committed
chore: fix docker build
1 parent 700dd68 commit dc79611

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- main
77
paths:
88
- 'docker/**'
9+
pull_request:
10+
branches: [ "main" ]
911
workflow_dispatch:
1012

1113
jobs:
@@ -28,7 +30,7 @@ jobs:
2830
- name: Build and push
2931
uses: docker/build-push-action@v5
3032
with:
31-
context: docker
32-
file: ./Dockerfile
33+
context: ./docker
34+
file: ./docker/Dockerfile
3335
push: true
3436
tags: zzjason/leanstore-dev:latest

docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ RUN git clone --depth 1 https://github.com/Microsoft/vcpkg.git /opt/vcpkg \
2222
&& mv /opt/vcpkg/triplets/x64-linux.cmake /opt/vcpkg/triplets/x64-linux-static.cmake \
2323
&& echo 'export VCPKG_ROOT=/opt/vcpkg' >> /opt/env.sh \
2424
&& echo 'export PATH=$VCPKG_ROOT:$PATH' >> /opt/env.sh \
25-
&& echo 'export VCPKG_FORCE_SYSTEM_BINARIES=1' >> /opt/env.sh
25+
&& echo 'export VCPKG_FORCE_SYSTEM_BINARIES=1' >> /opt/env.sh \
26+
&& echo 'export VCPKG_DEFAULT_BINARY_CACHE=/opt/vcpkg_cache' > /opt/env.sh
2627

2728
COPY vcpkg-triplets/x64-linux.cmake /opt/vcpkg/triplets/x64-linux.cmake
2829
COPY vcpkg-triplets/arm64-linux.cmake /opt/vcpkg/triplets/arm64-linux.cmake
2930

3031
ENV VCPKG_ROOT="/opt/vcpkg"
3132
ENV PATH="$VCPKG_ROOT:$PATH"
3233
ENV VCPKG_FORCE_SYSTEM_BINARIES=1
34+
ENV VCPKG_DEFAULT_BINARY_CACHE=/opt/vcpkg_cache
3335

3436

3537
# install vcpkg packages

0 commit comments

Comments
 (0)