Add entrypoint script to dslim build
In my image I used an entrypoint that insert env variables to vue project, in Dockerfile:
COPY ./client/entrypoint.sh /usr/share/nginx/entrypoint.sh
RUN chmod +x /usr/share/nginx/entrypoint.sh
ENTRYPOINT ["sh", "/usr/share/nginx/entrypoint.sh"]
and the docker command is:
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock dslim/docker-slim build --http-probe=false --include-path=/usr/src/app --include-path=/usr/local/lib/node_modules/npm/node_modules my_image_name
I'm not sure where I supose to add flag for entrypoint and which one
Thanks for any help :D
@BEIIKS not quite clear what you are trying to accomplish with the entrypoint flag. docker-slim does have a way to override the entrypoint for your container, but you shouldn't need to use it unless you don't want docker-slim to use what's declared as the entrypoint in your Dockerfile. If you want ENTRYPOINT ["sh", "/usr/share/nginx/entrypoint.sh"] to execute then you don't need to do anything extra.
By the way, I'm curious why you are disabling http probes if you have a Vue app... Do you have an EXPOSE instruction in your Dockerfile?
@BEIIKS not quite clear what you are trying to accomplish with the entrypoint flag.
docker-slimdoes have a way to override the entrypoint for your container, but you shouldn't need to use it unless you don't wantdocker-slimto use what's declared as the entrypoint in your Dockerfile. If you wantENTRYPOINT ["sh", "/usr/share/nginx/entrypoint.sh"]to execute then you don't need to do anything extra.By the way, I'm curious why you are disabling http probes if you have a Vue app... Do you have an
EXPOSEinstruction in your Dockerfile?
Well then, I guess it's because something else. I'll let you see the difference between the full size image and the shave one.
Full size - 
After dslim - 
And yes, for extra information we have EXPOSE 80 in our docket file, not that it matters at all.