2023-09-05 19:42:25 +03:00
|
|
|
FROM --platform=$TARGETPLATFORM alpine:3.17 AS builder
|
|
|
|
ARG TARGETPLATFORM
|
2023-08-21 17:02:43 +03:00
|
|
|
WORKDIR /tmp/hurl-docker
|
|
|
|
COPY . /tmp/hurl-docker
|
2023-05-05 10:08:45 +03:00
|
|
|
RUN apk add --no-cache bash git && \
|
2023-09-05 19:42:25 +03:00
|
|
|
if [ "${TARGETPLATFORM}" = "linux/arm64" ] ; then \
|
|
|
|
apk add --no-cache -y g++-aarch64-linux-gnu libc6-dev-arm64-cross ; \
|
2023-09-08 12:39:39 +03:00
|
|
|
source bin/export_cross_compile_env.sh ; \
|
2023-09-05 19:42:25 +03:00
|
|
|
fi ; \
|
2023-09-12 12:47:26 +03:00
|
|
|
bash -c "bin/install_prerequisites_alpine.sh" && \
|
|
|
|
bash -c "bin/install_rust.sh" && \
|
|
|
|
bash -c "./bin/release/release.sh"
|
2021-10-23 20:16:41 +03:00
|
|
|
|
2023-09-05 19:42:25 +03:00
|
|
|
FROM --platform=$TARGETPLATFORM alpine:3.17 AS runner
|
2021-12-15 16:22:29 +03:00
|
|
|
ARG docker_build_date
|
2023-08-21 17:02:43 +03:00
|
|
|
ARG docker_build_tag
|
2022-11-18 22:20:08 +03:00
|
|
|
LABEL "org.opencontainers.image.source"="https://github.com/Orange-OpenSource/hurl"
|
|
|
|
LABEL "org.opencontainers.image.description"="Hurl is a command line tool that runs HTTP requests defined in a simple plain text format"
|
2022-11-21 17:29:39 +03:00
|
|
|
LABEL "org.opencontainers.image.licenses"="Apache-2.0"
|
2021-12-15 16:22:29 +03:00
|
|
|
LABEL "com.orange.hurl.created"="${docker_build_date}"
|
|
|
|
LABEL "com.orange.hurl.authors"="Fabrice REIX, Jean Christophe AMIEL, Orange-OpenSource"
|
|
|
|
LABEL "com.orange.hurl.url"="https://hurl.dev"
|
|
|
|
LABEL "com.orange.hurl.documentation"="https://hurl.dev"
|
|
|
|
LABEL "com.orange.hurl.source"="https://github.com/Orange-OpenSource/hurl"
|
2023-08-21 17:02:43 +03:00
|
|
|
LABEL "com.orange.hurl.version"=${docker_build_tag}
|
2021-12-15 16:22:29 +03:00
|
|
|
LABEL "com.orange.hurl.vendor"="Orange-OpenSource"
|
|
|
|
LABEL "com.orange.hurl.licenses"="Apache-2.0"
|
|
|
|
LABEL "com.orange.hurl.title"="Hurl"
|
|
|
|
LABEL "com.orange.hurl.description"="Hurl is a command line tool that runs HTTP requests defined in a simple plain text format"
|
2022-11-18 16:06:40 +03:00
|
|
|
LABEL "com.orange.hurl.base.name"="alpine:3.17"
|
2023-08-21 17:02:43 +03:00
|
|
|
COPY --from=builder /tmp/hurl-docker/target/release/hurl /usr/bin/
|
|
|
|
COPY --from=builder /tmp/hurl-docker/target/release/hurlfmt /usr/bin/
|
|
|
|
COPY --from=builder /usr/lib/libcurl.so.* /usr/lib/
|
|
|
|
COPY --from=builder /usr/lib/libnghttp2.so.* /usr/lib/
|
|
|
|
COPY --from=builder /usr/lib/libbrotli*.so.* /usr/lib/
|
|
|
|
COPY --from=builder /usr/lib/libxml2.so.* /usr/lib/
|
|
|
|
COPY --from=builder /usr/lib/libgcc_s.so.* /usr/lib/
|
|
|
|
COPY --from=builder /usr/lib/liblzma.so.* /usr/lib/
|
|
|
|
COPY --from=builder /usr/lib/libidn2.so.* /usr/lib/
|
2021-12-15 16:22:29 +03:00
|
|
|
ENTRYPOINT ["/usr/bin/hurl"]
|
2023-09-05 19:42:25 +03:00
|
|
|
|