Docker: Reverse Engineering of an Image

后端 未结 3 1879
梦如初夏
梦如初夏 2021-01-01 18:06

When we use Docker it\'s very easy push and pull image in a public repository in our https://hub.docker.com but this repository it\'s free only for public image

3条回答
  •  心在旅途
    2021-01-01 18:48

    You can use laniksj/dfimage to reverse engineering of an image.

    For example:

    # docker run -v /var/run/docker.sock:/var/run/docker.sock laniksj/dfimage 
    FROM node:12.4.0-alpine
    RUN /bin/sh -c apk update
    RUN /bin/sh -c apk -Uuv add groff less python py-pip
    RUN /bin/sh -c pip install awscli
    RUN /bin/sh -c apk --purge -v del py-pip
    RUN /bin/sh -c rm /var/cache/apk/*
    RUN /bin/sh -c apk add --no-cache curl
    ADD dir:4afc740ff29e4a32a34617d2715e5e5dc8740f357254bc6d3f9362bb04af0253 in /app
    COPY file:b57abdb61ae72f3a25be67f719b95275da348f9dfb63fb4ff67410a595ae1dfd in /usr/local/bin/
    WORKDIR /app
    RUN /bin/sh -c npm install
    ENTRYPOINT ["docker-entrypoint.sh"]
    CMD ["node" "app.js"]
    

提交回复
热议问题