Giter VIP home page Giter VIP logo

Comments (7)

sosiouxme avatar sosiouxme commented on August 20, 2024

https://docs.docker.com/engine/reference/builder/#add seems to be wrong about this (does not look changed since docker 1.13):
If <dest> does not end with a trailing slash, it will be considered a regular file and the contents of <src> will be written at <dest>.

This is not specific to /usr/bin, the same treatment seems to occur with any pre-existing directory on the image.

from imagebuilder.

smarterclayton avatar smarterclayton commented on August 20, 2024

Hrm, this works for me.

from imagebuilder.

smarterclayton avatar smarterclayton commented on August 20, 2024

Tested with the following:

FROM centos:7
ADD script /usr/bin
RUN find /usr/bin

Puts script into /usr/bin/script

FROM busybox
ADD script /usr/bin
RUN find /usr/bin

puts script at /usr/bin

fedora:

FROM fedora:28
ADD script /usr/bin
RUN find /usr/bin

Fails as described.

from imagebuilder.

smarterclayton avatar smarterclayton commented on August 20, 2024
docker run fedora:28 find /usr/bin
container_linux.go:247: starting container process caused "exec: \"find\": executable file not found in $PATH"
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: \"find\": executable file not found in $PATH".
ERRO[0000] error getting events from daemon: net/http: request canceled

I think there is something off about the fedora 28 image

from imagebuilder.

smarterclayton avatar smarterclayton commented on August 20, 2024

Oh, it doesn't have find.

Ok, i have a reproducer. Docker is checking the destination path. We can't do that as easily as the daemon. Going to have to look at options.

from imagebuilder.

smarterclayton avatar smarterclayton commented on August 20, 2024

Fixed, please test it out.

from imagebuilder.

smarterclayton avatar smarterclayton commented on August 20, 2024

Found another bug in #86

from imagebuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.