-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
71 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,48 @@ | ||
FROM debian:latest | ||
FROM debian:bookworm-slim as minicrawler | ||
|
||
ENV LANGUAGE en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
ENV LC_ALL C | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ENV CFLAGS "-O3 -g -fstack-protector-strong" | ||
|
||
RUN apt-get -qqy update && apt-get -qqy install \ | ||
# minicrawler dev deps | ||
libc-ares-dev \ | ||
zlib1g-dev \ | ||
libicu-dev \ | ||
libssl-dev \ | ||
libnghttp2-dev \ | ||
\ | ||
# build tool | ||
make \ | ||
autoconf \ | ||
automake \ | ||
autotools-dev \ | ||
build-essential \ | ||
libtool \ | ||
gcc \ | ||
\ | ||
# php for testing | ||
php \ | ||
\ | ||
# tools | ||
curl \ | ||
ca-certificates \ | ||
apt-transport-https \ | ||
locales \ | ||
tzdata \ | ||
\ | ||
&& sed -i 's/^.*\(en_US.UTF-8\)/\1/' /etc/locale.gen \ | ||
&& locale-gen \ | ||
&& ln -sf "/usr/share/zoneinfo/Europe/Prague" /etc/localtime && dpkg-reconfigure tzdata \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ | ||
# update certificates \ | ||
&& mkdir -p /var/lib/certs \ | ||
&& curl -s -f -L https://curl.se/ca/cacert.pem -o ca-bundle.crt \ | ||
&& cat /etc/ssl/certs/ca-certificates.crt >> ca-bundle.crt \ | ||
&& cp -v ca-bundle.crt /var/lib/certs/ca-bundle.crt | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt update && apt -y install \ | ||
# minicrawler dev deps | ||
libc-ares-dev \ | ||
zlib1g-dev \ | ||
libicu-dev \ | ||
libssl-dev \ | ||
libnghttp2-dev \ | ||
\ | ||
# build tool | ||
make \ | ||
autoconf \ | ||
automake \ | ||
autotools-dev \ | ||
build-essential \ | ||
libtool \ | ||
gcc \ | ||
\ | ||
# tools | ||
curl \ | ||
ca-certificates \ | ||
apt-transport-https \ | ||
locales \ | ||
tzdata \ | ||
\ | ||
&& sed -i 's/^.*\(en_US.UTF-8\)/\1/' /etc/locale.gen \ | ||
&& locale-gen \ | ||
&& ln -sf "/usr/share/zoneinfo/Europe/Prague" /etc/localtime && dpkg-reconfigure tzdata \ | ||
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \ | ||
# update certificates \ | ||
&& mkdir -p /var/lib/certs \ | ||
&& curl -s -f -L https://curl.se/ca/cacert.pem -o ca-bundle.crt \ | ||
&& cat /etc/ssl/certs/ca-certificates.crt >> ca-bundle.crt \ | ||
&& cp -v ca-bundle.crt /var/lib/certs/ca-bundle.crt | ||
|
||
ENV LC_ALL en_US.UTF-8 | ||
|
||
ARG PREFIX="/var/lib/minicrawler/usr" | ||
# copy minicrawler source | ||
WORKDIR /minicrawler | ||
COPY . /minicrawler | ||
|
||
WORKDIR /minicrawler | ||
RUN ./autogen.sh \ | ||
&& ./configure --prefix=/var/lib/minicrawler/usr --with-ca-bundle=/var/lib/certs/ca-bundle.crt --with-ca-path=/etc/ssl/certs \ | ||
&& make || exit 42 \ | ||
&& make install || exit 43 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Define the Docker Compose services block | ||
# https://docs.docker.com/build/bake/reference/ | ||
|
||
#################################################################################################### | ||
# docker buildx bake --file docker-bake.hcl minicrawler --push --no-cache --progress=plain | ||
#################################################################################################### | ||
|
||
target "minicrawler" { | ||
args = { | ||
MINICRAWLER_VERSION = "v5.2.6" | ||
} | ||
context = "git@gitlab.int.wikidi.net:testomato/minicrawler.git" | ||
dockerfile = ".docker/minicrawler/Dockerfile" | ||
platforms = ["linux/amd64", "linux/arm64"] | ||
ssh = ["default"] | ||
pull = true | ||
tags = [ | ||
"dr.brzy.cz/testomato/minicrawler:latest", | ||
"dr.brzy.cz/testomato/minicrawler:v5.2.6", | ||
] | ||
} | ||
|
||
#################################################################################################### | ||
# docker buildx bake --file docker-bake.hcl --push --no-cache --progress=plain | ||
#################################################################################################### | ||
|
||
group "default" { | ||
targets = ["minicrawler"] | ||
} |