<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>chibiccooooo</author_name>
  <author_url>https://blog.hatena.ne.jp/chibiccooooo/</author_url>
  <blog_title>chibicco's blog</blog_title>
  <blog_url>https://blog.chibicco.dev/</blog_url>
  <categories>
    <anon>Docker</anon>
  </categories>
  <description>結論 コピー元に . を指定することで指定したディレクトリ配下のファイル・ディレクトリ全てがコピーされる。 docker compose cp database/migrations/. app:/src/database/migrations/ ファイルだけ, 拡張子を指定したい... などのユースケースは for で愚直にloopするしかない。 for file in database/migrations/*.rb; do docker compose cp $file app:/src/database/migrations/; done 何に困っていたか cpコマンドと同じノリで実行…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.chibicco.dev%2Fentry%2F2024%2F03%2F19%2F195309&quot; title=&quot;docker compose cp でディレクトリ配下のファイルを全てコピーしたい - chibicco&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-03-19 19:53:09</published>
  <title>docker compose cp でディレクトリ配下のファイルを全てコピーしたい</title>
  <type>rich</type>
  <url>https://blog.chibicco.dev/entry/2024/03/19/195309</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
