Skip to content

Commit 9164804

Browse files
committed
Minicrawler container (without build tools and dev deps)
1 parent c650bfe commit 9164804

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.docker/Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
FROM debian:bookworm-slim as minicrawler
2-
1+
FROM debian:bookworm-slim as minicrawler-build
32
ENV DEBIAN_FRONTEND noninteractive
4-
53
RUN apt-get update && apt-get -y install \
64
# minicrawler dev deps
75
libc-ares-dev \
@@ -38,7 +36,6 @@ RUN apt-get update && apt-get -y install \
3836

3937
ENV LC_ALL en_US.UTF-8
4038

41-
# copy minicrawler source
4239
WORKDIR /minicrawler
4340
COPY . /minicrawler
4441

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

50-
FROM minicrawler as minicrawler-with-php
51-
47+
# Minicrawler (without build tools and dev deps)
48+
FROM debian:bookworm-slim as minicrawler
5249
ENV DEBIAN_FRONTEND noninteractive
50+
COPY --from=minicrawler-build /var/lib/minicrawler/usr /var/lib/minicrawler/usr
5351

52+
# Minicrawler with PHP for testing and debugging
53+
FROM minicrawler as minicrawler-with-php
54+
ENV DEBIAN_FRONTEND noninteractive
5455
RUN apt-get update && apt-get -y install php

docker-bake.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
target "minicrawler" {
99
context = "."
1010
dockerfile = ".docker/Dockerfile"
11+
target = "minicrawler"
1112
platforms = ["linux/amd64", "linux/arm64"]
1213
pull = true
1314
tags = [

0 commit comments

Comments
 (0)