api-registry/Dockerfile

38 lines
1.2 KiB
Docker
Raw Normal View History

2024-12-05 16:55:03 +01:00
FROM envoyproxy/envoy:distroless-v1.29-latest AS envoy
FROM ubuntu:latest AS base
2024-12-24 14:20:35 +01:00
FROM hashicorp/consul:1.20.1-ubi
2024-12-05 16:55:03 +01:00
USER root
2022-12-02 22:05:47 +01:00
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"
2024-12-05 16:55:03 +01:00
ENV CGO_ENABLED=0
COPY ./api-registry/etc/consul /consul/config
2024-12-24 14:20:35 +01:00
COPY ./api-registry/etc/addons/* /consul/config/
2024-12-05 16:55:03 +01:00
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 /
2022-12-02 22:05:47 +01:00
2024-12-05 16:55:03 +01:00
EXPOSE 53 53/udp 8443 8501
2022-12-02 22:05:47 +01:00
2024-12-05 16:55:03 +01:00
ENTRYPOINT ["/entrypoint.sh"]
CMD ["consul", "agent", "-config-dir=/consul/config"]