Copy and paste the file contents in Ubuntu's Docker container

It was when I tried to copy and paste the file contents in the Docker container I am using now.

On Mac, you can copy and paste the file contents with pbcopy.

$ pbcopy < helloworld.txt
// pbcopy <The file you want to copy

For Ubuntu, use xsel.

$ apt-get -y install xsel
$ xsel -b < helloworld.cpp 
// xsel -b <The file you want to copy

Recommended Posts

Copy and paste the file contents in Ubuntu's Docker container
Check the contents by docker pull from ECR and start the container
Kind @ Mac in Docker and vctl container
How to check the logs in the Docker container
[Docker] Check the running container and enter there
How Docker works ~ Implement the container in 60 lines
How to mount the batch file location via WSL2 and start the Docker container
Copy and paste the source in class development ...? That's NO! Let's know about "inheritance"!
Install docker and docker-compose on ubuntu in the shortest process
Organize communication in an environment that uses various resources on the host machine and Docker container
Until you build the docker environment and start / stop the Ubuntu container
Replace the contents of the Jar file
Unzip the zip file in Java
Hit the Docker API in Rust
About file copy processing in Java
Copy and paste test with RSpec
About Docker, disguise server and container
For the time being, run the war file delivered in Java with Docker
The story of forgetting to close a file in Java and failing
Starting with installing Docker on EC2 and running Yellowfin in a container
[Copy and paste] Build a Laravel development environment with Docker Compose Part 2
Run x11 apps in a Docker container (supports network access from the container)
Put Zabbix in Ubuntu with Docker and monitor Docker on the same host
[Copy and paste] Build a Laravel development environment with Docker Compose Participation
How to start a Docker container with a volume mounted in a batch file
Recreate the container and then start it
The story of updating SonarQube's Docker Container
Folding and unfolding the contents of the Recyclerview
MySQL container does not start in Docker
Directly operate mariadb running in Docker container
[Docker] Copy files from docker container to host
[Docker] Start the container as soon as possible
[Docker] Start container, start bash in container, delete image
Install the IBM Cloud CLI in the container
Japanese setting of mysql in Docker container
[Java8] Search the directory and get the file
Java: Download the file and save it in the location selected in the dialog [Use HttpClient]
When composer install/require in the Docker container, it becomes `Could not find package`
Monitor the Docker container and SystemD process on the same host with Zabbix on Ubuntu.
[Rails 6] Specific method of embedding Font Awesome in link_to [Copy and paste OK]
Summary of copy and paste commands used when you want to delete the cache in iOS application development anyway