You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Docker Copy
v2.0.0
GitHub action to run steps using docker
...
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build
uses: docker/build-push-action@v3
with:
context: .
load: true
push: false
tags: user/app:latest
- name: Run
uses: tj-actions/docker-run@v2
with:
image: user/app:latest
options: --name test-app -d
args: sleep 10000
- name: Copy from container to host
uses: tj-actions/docker-cp@v1
with:
container: test-app
source: test.txt
destination: test.txt
- name: Display contents of test.txt
run: cat test.txt
# Hello World
...
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build
uses: docker/build-push-action@v3
with:
context: .
load: true
push: false
tags: user/app:latest
- name: Create test.txt
run: echo "Hello World" >> test.txt
- name: Run
uses: tj-actions/docker-run@v2
with:
image: user/app:latest
options: --name test-app -d
args: sleep 10000
- name: Copy from host to container
uses: tj-actions/docker-cp@v1
with:
container: test-app
source: test.txt
destination: test.txt
local: true
- name: Display contents of test.txt
run: docker exec test-app cat test.txt
INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
---|---|---|---|---|
container | string | true | Container name | |
destination | string | true | Destination file or directory | |
local | string | false | "false" |
Copy from local to container |
options | string | false | Additional options | |
source | string | true | Source file or directory |
- Free software: MIT license
If you feel generous and want to show some extra appreciation:
This package was created with Cookiecutter using cookiecutter-action
Report bugs at https://github.com/tj-actions/docker-cp/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your workflow that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.