Search code examples
dockercopy

Copy . . in dockerfile


I understand that COPY can copy files from source folder to destination, but what is purpose of COPY . .?

For example:

FROM ruby:2.5.1
WORKDIR /usr/src/app
COPY Gemfile Gemfile.lock ./
RUN bundle install
COPY . .
CMD ["./your-daemon-or-script.rb"]

Solution

  • That will copy the current working directory of your local machine into the current working directory of the container.