Docker – difference between CMD and ENTRYPOINT

The CMD line in a Dockerfile defines the default command to run when a container is launched. If the command requires arguments then you need to use an array, for example ["cmd", "-a", "arga value", "-b", "argb-value"], which will be combined together and the command cmd -a arga value -b argb-valuewould be run. An alternative approach to CMD is ENTRYPOINT. While … Continue reading Docker – difference between CMD and ENTRYPOINT

Advertisements

RedHat – Rebuild corrupted rpmdb

The "rpmdb" is broken and not able to run any of the rpm commands. #rpm -qa rpmdb: Thread/process 3392/140287890028448 failed: Thread died in Berkeley DB library error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 -  (-30974) error: cannot open Packages database in /var/lib/rpm rpmdb: Thread/process … Continue reading RedHat – Rebuild corrupted rpmdb

Linux – Users and Groups – Part 1

Ok.. Lets start with creating a group called "dba" and create user "oracle" belongs to "dba" group. We could see that from "/etc/passwd" that oracle user id is 1521 and primary group id is 5000. But we haven't set the password yet for "oracle" user. If we watch closely "/etc/shadow" password the second column is !! which … Continue reading Linux – Users and Groups – Part 1

AWS Autoscaling – Min Desired Max

As mentioned here : https://stackoverflow.com/questions/36270873/aws-ec2-auto-scaling-groups-i-get-min-and-max-but-whats-desired-instances-lim MIN: This will be the minimum number of instances that can run in your auto scale group. If your scale down CloudWatch alarm is triggered, your auto scale group will never terminate instances below this number. DESIRED: If you trip a CloudWatch alarm for a scale up event, then it … Continue reading AWS Autoscaling – Min Desired Max

SFTP – Connections and File Permissions – Part 4

Continuing the SFTP series of blog pages - lets take a look at some random snippets which are really helpful. Specifying the private key while dong SFTP sftp -o "IdentityFile=/path/to/private_key" jay@server.name.com We can also place the options in "config" file. Sample contents of ~/.ssh/config Host the_hostname User user_name IdentityFile /path/to/private_key 2. Prepare a batch file with … Continue reading SFTP – Connections and File Permissions – Part 4