FROM envoyproxy/envoy:distroless-v1.29-latest AS envoy FROM ubuntu:latest AS base FROM hashicorp/consul:1.20.1-ubi USER root LABEL dev.egommerce.image.author="Piotr Biernat" LABEL dev.egommerce.image.vendor="Egommerce" LABEL dev.egommerce.image.service="api-registry" LABEL dev.egommerce.image.version="1.0" ENV CGO_ENABLED=0 COPY ./api-registry/etc/consul /consul/config COPY ./api-registry/etc/addons/* /consul/config/ COPY ./api-registry/etc/consul-template /consul/template COPY ./api-registry/opt /opt/consul COPY ./api-registry/entrypoint.sh / # Fix for running Go apps in container @https://stackoverflow.com/a/35613430 #RUN rm /lib64/ld-linux-x86-64.so.2 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 # RUN apt update && \ # apt install -y curl # RUN microdnf --enablerepo=rhel-7-server-rpms \ # install curl --nodocs COPY --from=base /usr/bin/hostname /usr/bin/hostname # COPY --from=base /usr/bin/ps /usr/bin/ps COPY --from=envoy /usr/local/bin/envoy /bin/envoy # COPY ./.app.config / COPY ./api-registry/spawn-process.sh / EXPOSE 53 53/udp 8443 8501 ENTRYPOINT ["/entrypoint.sh"] CMD ["consul", "agent", "-config-dir=/consul/config"]