From 68b102f9c9e04b466100dc75013ac73547d42e7b Mon Sep 17 00:00:00 2001 From: maeddes Date: Fri, 28 Jun 2024 13:18:38 +0000 Subject: [PATCH] alternative image --- .devcontainer/Dockerfile | 4 +- .devcontainer/Dockerfile-bookworm | 64 +++++++++++++++++++++++++++++++ .devcontainer/Dockerfile-maven | 62 ++++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/Dockerfile-bookworm create mode 100644 .devcontainer/Dockerfile-maven diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 38cfb59..247385f 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:bookworm-slim as dind +FROM maven:3 as dind ARG DEBIAN_FRONTEND=noninteractive ENV PIP_ROOT_USER_ACTION=ignore @@ -33,8 +33,6 @@ RUN apt-get update; \ bash \ curl \ build-essential \ - gradle \ - maven \ python3 \ python-is-python3 \ python3-dev \ diff --git a/.devcontainer/Dockerfile-bookworm b/.devcontainer/Dockerfile-bookworm new file mode 100644 index 0000000..38cfb59 --- /dev/null +++ b/.devcontainer/Dockerfile-bookworm @@ -0,0 +1,64 @@ +FROM debian:bookworm-slim as dind + +ARG DEBIAN_FRONTEND=noninteractive +ENV PIP_ROOT_USER_ACTION=ignore + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + sudo \ + ca-certificates \ + iptables \ + net-tools \ + openssl \ + pigz \ + xz-utils \ + procps \ + supervisor + +COPY --from=docker:26-dind /usr/local/bin /usr/local/bin +COPY --from=docker:26-dind /usr/local/libexec/docker/cli-plugins /usr/local/libexec/docker/cli-plugins + +COPY entrypoint.sh /usr/local/bin +RUN chmod +x /usr/local/bin/entrypoint.sh + +RUN update-alternatives --set iptables /usr/sbin/iptables-legacy +RUN update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy + +VOLUME /var/lib/docker + +RUN apt-get update; \ + apt-get install --yes --no-install-recommends \ + sudo \ + bash \ + curl \ + build-essential \ + gradle \ + maven \ + python3 \ + python-is-python3 \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + python3-psutil; \ + apt clean; \ + rm -rf /var/lib/apt/lists/* + +RUN rm -rf /usr/lib/python3*/EXTERNALLY-MANAGED + +RUN pip install \ + flask \ + Faker \ + requests \ + opentelemetry-api \ + opentelemetry-sdk \ + opentelemetry-exporter-prometheus \ + opentelemetry-exporter-otlp \ + opentelemetry-instrumentation-flask + +WORKDIR /workspace + +EXPOSE 5000 + +ENTRYPOINT [ "entrypoint.sh" ] \ No newline at end of file diff --git a/.devcontainer/Dockerfile-maven b/.devcontainer/Dockerfile-maven new file mode 100644 index 0000000..247385f --- /dev/null +++ b/.devcontainer/Dockerfile-maven @@ -0,0 +1,62 @@ +FROM maven:3 as dind + +ARG DEBIAN_FRONTEND=noninteractive +ENV PIP_ROOT_USER_ACTION=ignore + +RUN set -eux; \ + apt-get update; \ + apt-get install -y --no-install-recommends \ + sudo \ + ca-certificates \ + iptables \ + net-tools \ + openssl \ + pigz \ + xz-utils \ + procps \ + supervisor + +COPY --from=docker:26-dind /usr/local/bin /usr/local/bin +COPY --from=docker:26-dind /usr/local/libexec/docker/cli-plugins /usr/local/libexec/docker/cli-plugins + +COPY entrypoint.sh /usr/local/bin +RUN chmod +x /usr/local/bin/entrypoint.sh + +RUN update-alternatives --set iptables /usr/sbin/iptables-legacy +RUN update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy + +VOLUME /var/lib/docker + +RUN apt-get update; \ + apt-get install --yes --no-install-recommends \ + sudo \ + bash \ + curl \ + build-essential \ + python3 \ + python-is-python3 \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + python3-psutil; \ + apt clean; \ + rm -rf /var/lib/apt/lists/* + +RUN rm -rf /usr/lib/python3*/EXTERNALLY-MANAGED + +RUN pip install \ + flask \ + Faker \ + requests \ + opentelemetry-api \ + opentelemetry-sdk \ + opentelemetry-exporter-prometheus \ + opentelemetry-exporter-otlp \ + opentelemetry-instrumentation-flask + +WORKDIR /workspace + +EXPOSE 5000 + +ENTRYPOINT [ "entrypoint.sh" ] \ No newline at end of file