Author: Surendra Anne

Docker: How to copy files to/from docker container

There are some situation where you want to copy files to and from a docker container so that we will have data accessabile in host system or within the container. This can be achieved through multiple ways as listed below. Through docker cp command Through docker volumes We will learn these two methods with some examples and explanations. How to use docker cp command Syntax: Usage: docker cp [OPTIONS] CONTAINER:SRC_PATH DEST_PATH docker cp [OPTIONS] SRC_PATH CONTAINER:DEST_PATH So ‘docker cp’ command is similar to scp command. Example: For copying a file(in this case a chef-server deb file) from the container we can use below command First list available docker containers in your host: docker ps Note: We can not retrieve files from a dead/exited docker container, your docker container need to be in running state. Example output of “docker ps” SurendraAnneMacBook-Pro:docker-chef-server surendraanne$ docker ps CONTAINER ID        IMAGE                                   COMMAND                  CREATED             STATUS              PORTS                          NAMES 08a50f4ba59d        docker_chef-server                      "/bin/bash"              4 seconds ago  ...

Read More

Anisble: ERROR! unexpected parameter type in action: Fix

Lately I am working on automating my website creation so that if I want to change my hosting provider. The other thought is to host my site locally on my kubernetes cluster which I am planing to implement in my home. I created an Ansible playbook to automate my WordPress website installation as this a small project with out complexity. This is a kind of backup strategy for the site so I will have latest backup of linuxnix.com site. After almost 3 years later I started using Ansible for this project. I felt Chef and puppet is not that suitable for this. I written couple of roles for WordPress software installation MySQL software installation Nginx software installation etc. When I executed my playbook containing these roles I come across below weird error. root@linuxnix:~# ansible-playbook -i wordpress-setup/hosts wordpress-setup/wordpress-setup.yml Error: ERROR! unexpected parameter type in action: <type 'bool'> The error appears to be in '/root/wordpress-setup/roles/mysql/tasks/main.yml': line 2, column 3, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: --- - name: Install MySQL software ^ here Initially I thought it was a linting issue(A kind of file format issue) within in my mysql tasks as it show error above. But after carefully observing I come to know the actual error was with unexpected parameter not with any linting issue from the...

Read More

FREE: JOIN OUR DEVOPS TELEGRAM GROUPS

Welcome to new Telegram groups for DevOps We created new telegram groups for community to ask questions and share their knowledge. We thought of creating a single devops group as Telegram have no major roadblock in adding a huge list of people. But felt to have different groups for different major DevOps tools. The existing WhatsApp groups invite links are disabled as we see many spammers spamming the groups. It’s cumbersome to manage as we have to ban spammers from different groups, create a new group after we fill up 255 group members and no proper administration controls. We later realised that WhatsApp is not for large groups where people can reach 255 with ease on sites like us. Some of the disadvantages prompted us to move to telegram as below. The limit in the number of people joins in a group. No anti spam mechanism like disable new user for a certain time. WhatsApp groups die as old people just stay there and no new questions asked after a certain number of moths. No pinning of messages No special privileges of the owner/admin of the group. No bot support on free WhatsApp. All these limitations prompted us to create new telegram groups. Please feel free to leave in comments if you require a new group for a specific DevOps tool. We will see if it really worth to...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.