I’m trying to add a custom script to add some custom hosts to my docker image (cant use –add-host).
I’m trying to add that script to my image that extends MinIO image on startup but no matter what I try, my script don’t run.
I even tried to leave the entrypoint
and cmd
empty to at least see if it’s being overwritten but the entrypoint
and cmd
still persists from the MinIO image.
I tried to follow this post: Docker – extend the parent’s ENTRYPOINT
Here’s what I tried so far in my Dockerfile:
FROM minio/minio:RELEASE.2024-07-15T19-02-30Z
# build custom script
RUN echo "#!/bin/sh" >> setup.sh
RUN echo "echo 192.168.0.123 custom.domain.example >> /etc/hosts" >> setup.sh
RUN echo "minio" >> setup.sh
RUN chmod +x setup.sh
ENTRYPOINT [] # Not even leaving it empty does anything
CMD ["./setup.sh"] # Not even leaving it empty does anything
Why the entrypoint
and cmd
doesn’t get overwritten?
6