fix(ci): docker build, use --ssh instead of -v

This commit is contained in:
rudy
2023-01-04 14:45:31 +01:00
committed by rudy-6-4
parent 7bcb3377fa
commit 5797d73683
2 changed files with 6 additions and 8 deletions

View File

@@ -689,16 +689,11 @@ jobs:
- name: Login to Registry
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login -u ${{ secrets.GHCR_LOGIN }} --password-stdin ghcr.io
- name: Set up ssh auth in docker
run: |
echo "SSH_AUTH_SOCK_DIR=$(dirname $SSH_AUTH_SOCK)" >> "${GITHUB_ENV}"
# label was initially a need from the frontend CI
- name: Build Image
run: |
docker image build --no-cache \
-v ${{ env.SSH_AUTH_SOCK }}:/ssh.socket \
-e SSH_AUTH_SOCK=/ssh.socket \
DOCKER_BUILDKIT=1 docker build --no-cache \
--ssh default=${{ env.SSH_AUTH_SOCK }} \
--label "commit-sha=${{ github.sha }}" -t ${{ matrix.image }} -f ${{ matrix.dockerfile }} .
- name: Tag and Publish Image

View File

@@ -5,6 +5,9 @@ FROM quay.io/pypa/manylinux_2_28_x86_64:2022-11-19-1b19e81
RUN dnf install -y epel-release
RUN dnf update -y
RUN dnf install -y ninja-build hwloc-devel ccache clang ncurses-devel
RUN dnf install -y openssh-clients
RUN dnf clean all
RUN mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
# setup ccache with an unlimited amount of files and storage
RUN ccache -M 0
RUN ccache -F 0
@@ -38,7 +41,7 @@ COPY /llvm-project /llvm-project
COPY /compiler /compiler
WORKDIR /compiler
RUN mkdir -p /build
RUN make DATAFLOW_EXECUTION_ENABLED=ON BUILD_DIR=/build CCACHE=ON \
RUN --mount=type=ssh make DATAFLOW_EXECUTION_ENABLED=ON BUILD_DIR=/build CCACHE=ON \
Python3_EXECUTABLE=${PYTHON_EXEC} \
concretecompiler python-bindings rust-bindings
ENV PYTHONPATH "$PYTHONPATH:/build/tools/concretelang/python_packages/concretelang_core"