Skip to content

Commit

Permalink
Minicrawler container (without build tools and dev deps)
Browse files Browse the repository at this point in the history
  • Loading branch information
OzzyCzech committed Mar 22, 2024
1 parent c650bfe commit 9164804
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM debian:bookworm-slim as minicrawler

FROM debian:bookworm-slim as minicrawler-build
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get -y install \
# minicrawler dev deps
libc-ares-dev \
Expand Down Expand Up @@ -38,7 +36,6 @@ RUN apt-get update && apt-get -y install \

ENV LC_ALL en_US.UTF-8

# copy minicrawler source
WORKDIR /minicrawler
COPY . /minicrawler

Expand All @@ -47,8 +44,12 @@ RUN ./autogen.sh \
&& make || exit 42 \
&& make install || exit 43

FROM minicrawler as minicrawler-with-php

# Minicrawler (without build tools and dev deps)
FROM debian:bookworm-slim as minicrawler
ENV DEBIAN_FRONTEND noninteractive
COPY --from=minicrawler-build /var/lib/minicrawler/usr /var/lib/minicrawler/usr

# Minicrawler with PHP for testing and debugging
FROM minicrawler as minicrawler-with-php
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y install php
1 change: 1 addition & 0 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
target "minicrawler" {
context = "."
dockerfile = ".docker/Dockerfile"
target = "minicrawler"
platforms = ["linux/amd64", "linux/arm64"]
pull = true
tags = [
Expand Down

0 comments on commit 9164804

Please sign in to comment.