diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8f9c2ca..48545d7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,6 +35,8 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3.0.0 @@ -46,7 +48,7 @@ jobs: context: workers/${{ matrix.service }} tags: ${{ steps.docker_meta.outputs.tags }} labels: ${{ steps.docker_meta.outputs.labels }} - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true # Push with pr-### and sha-xxxxxxx tags - name: Build and Push Latest @@ -56,5 +58,5 @@ jobs: context: workers/${{ matrix.service }} tags: ${{ steps.docker_meta.outputs.tags }}, ashirt/${{ matrix.service }}:latest #Add latest tag for main labels: ${{ steps.docker_meta.outputs.labels }} - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true diff --git a/workers/tesseract-lambda/Dockerfile b/workers/tesseract-lambda/Dockerfile index 6aec5cb..1e96a0c 100644 --- a/workers/tesseract-lambda/Dockerfile +++ b/workers/tesseract-lambda/Dockerfile @@ -5,11 +5,16 @@ FROM public.ecr.aws/lambda/nodejs:16 RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \ && yum -y update \ - && yum -y install tesseract + && yum -y groupinstall 'Development Tools' \ + && yum -y install tesseract python3 COPY app ${LAMBDA_TASK_ROOT} COPY package.json ${LAMBDA_TASK_ROOT} RUN npm install +FROM public.ecr.aws/lambda/nodejs:16 + +COPY --from=0 ${LAMBDA_TASK_ROOT} ${LAMBDA_TASK_ROOT} + CMD ["app.handler"]