Rename a running docker container

I had a GitLab container running and when i wanted to shift it from HTTP to HTTPS, i started getting the following error after applying the certificate:

x509: certificate is valid for *.gitlab.dev.net, not gitlab

The running configuration for the GitLab container was as shown below:

sudo docker run --detach \
 --hostname gitlab.example.com \
 --publish 443:443 --publish 80:80 --publish 2222:22 \
 --name gitlab \
 --restart always \
 --volume /mnt/data/gitlab/config:/etc/gitlab \
 --volume /mnt/data/gitlab/logs:/var/log/gitlab \
 --volume /mnt/data/gitlab/data:/var/opt/gitlab \
 gitlab/gitlab-ce:latest

Mortein PowerGard खिलाये और चूहों में स्फूर्ति जगाये

TL;DR: Guys, don't buy Mortein PowerGard. It just doesn't work.

एक चूहा पिछले सप्ताह काफी round मार रहा था flat के हर कोने का. इतने round मार रहा था कि अपने ही flat में अजनबी सा महसूस करने लगा था मैं खुद को.

पहले तो लगा कि किसी अपने की तलाश में आ रहा था वो. कुछ समय बाद एहसास हुआ कि खाने की तलाश में था. फिर एक दिन जब मैं घर का समान लेने बाजार गया तो चूहे का ख़याल भी आ गया. ख़याल आते ही उसके लिए खाने का एक packet ले आया.


घर पे जब maid ने देखा तो बोला कि चूहा ये नहीं खाता. मैंने बोला, प्यार से खिलाने पे ज़रूर खाएगा और नहीं तो फिर इसमें कुछ मिला दिया जाए जो उसे बेहद पसंद हो. पर Mortein के साथ उसकी मनपसंद चीज़ मिलाने पर कही खाने का overall taste बदल तो नहीं जाएगा? ये सोच के मन विचलित होने लगा. कई ख़याल आने लगे मन में. कहीं नमक ज़्यादा ना हो जाए, कहीं Kitchen King कम ना पड़ जाए, वगेरह वगेरह. अभी मन इन्हीं विचारों से घिरा हुआ था कि तभी मेरी नज़र Mortein packet के ingredients पे पड़ी. विश्वास नहीं हुआ जो मैंने पढ़ा!

दूध का फटना और एक सुखद घटना

कल शाम market से घर आते समय दूध लेके आया था पर fridge में रखने का ध्यान नहीं रहा. अभी चाय पीने का मन किया और fridge खोला तो ज़ोर का झटका ज़ोर से ही लगा. बस एक ही बात मुँह से निकली, "Oh shit!". सहमे हुए मेरे कदम उस बैग की तरफ बढ़े जिसे bike ले जाते समय मैं हमेशा अपने साथ रखता हूँ. दूध का पैकेट बैग में यूँ था मानो माँ की गोद में बच्चा. मैंने सहमे हुए उसे बैग से निकाला और गरम करने के लिए बर्तन में डाला पर मेरा डर सही निकला. दूध फट गया! ये दृश्य देख ऐसे लगा मुझे जैसे मेरा कलेजा फट गया हो. किसी तरीके से मैंने खुद को संभाला और अभी kitchen से बाहर निकल ही रहा था बर्तन साफ़ करके कि तभी door bell बजी. दरवाज़ा खोला तो कोई leaflet हाथ में लिए खड़ा था. लगा कि कोई time pass करने आ गया. अभी ये सब ख़याल मन में आ ही रहे थे कि वो बोल पड़ा, "सर, हमने एक नया brand launch किया है दूध का जिसमें कोई मिलावट नहीं है. बिल्कुल pure! ये 1/2 लीटर का free sample please try कीजिये और अगर पसंद आये तो दिए गए नंबर पे कॉल करियेगा. आपको home delivery मिल जायेगी।".

Docker - Copy file from host machine to image

During building of an image using Dockerfile, i wanted to copy a file from my host to the container. While i was trying to do this, i came across this error:

[rancher@host-a alpine/]$ pwd
/home/rancher/alpine

[rancher@host-a alpine/]$ docker build -t my_image .
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM docker.artifactory.dummy.com/node:6.11.3-alpine
 ---> 4dd48e2236fe
Step 2 : ENV http_proxy 'http://proxy.dummy.com:8080' https_proxy 'http://proxy.dummy.com:8080' no_proxy 'localhost,dummy.com'
 ---> Using cache
 ---> ef16b2c8ceea
Step 3 : RUN apk add --no-cache openssl && mkdir -p /etc/docker/certs.d/docker.artifactory.dummy.com
 ---> Running in cf9126051357
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/APKINDEX.tar.gz
(1/1) Installing openssl (1.0.2k-r0)
Executing busybox-1.24.2-r13.trigger
OK: 7 MiB in 14 packages
 ---> 8644044ac525
Removing intermediate container cf9126051357
Step 4 : COPY /etc/docker/certs.d/docker.artifactory.dummy.com/ca.crt /etc/docker/certs.d/docker.artifactory.dummy.com/
lstat etc/docker/certs.d/docker.artifactory.dummy.com/ca.crt: no such file or directory

Best Before or Best After???

आज घर लौटते समय कुछ खाद्य-पदार्थ लिया 'Best Before' date देखने के बाद। रास्ते में एक बात ज़ेहन में आई कि खाद्य-पदार्थ तो ठीक है पर ज़हर पर क्या लिखा होता होगा? 'Best Before' या 'Best After'?

Rat gang busted in missing alcohol case - Patna police resolves case in record time

By now, most people are aware of the daring and illegal act that the rats committed in one of the police station in Patna, Bihar by drinking 9 lakh litres of alcohol that was in safe custody of Bihar police. For more details, please read the following article:

http://www.livemint.com/Politics/AzjRjzv64NSelk3dmIFtsM/Missing-alcohol-was-drunk-by-rats-says-Bihar-Police-For-re.html

Unethical practice by HDFC: Linking your account to VRM feature (chargeable) without your consent

A month ago, i was enjoying a cup of tea at my friend's place. After few sips, i checked my FB account. By chance, i came across the following article published by 'The Logical Indian' (TLI):

https://thelogicalindian.com/story-feed/awareness/hdfc-charging/

Since the article's headline was about HDFC charging some hidden fee, i got curious. As i was going through the details, i noticed the keywords 'Virtual Relationship Manager' and that's when i realized that i definitely came across one such email few days ago. The above article talks about a mail sent by HDFC where they are informing and silently imposing a nominal fee of Rs.100 (per quarter per customer ID) by associating user's account with a feature known as Virtual Relationship Manager (VRM). I had given a fleeting glance to the email which was originally sent to me on 9th Jan'17 and i didn't bother to go through the fine print at that time. All i assumed was that it's a new feature for those with preferred banking account. After reading TLI's post, i read the fine print of the email and i was taken aback. HDFC is one bank that i thought was more transparent in its fee structure than others. I was wrong! How can a bank impose fee for a new program without taking customer's explicit consent!?!

TVF, प्यार और मटर-पनीर

आज खाना खाते समय उस भूल का एहसास हुआ जो बरसों से करता आ रहा था। एक ऐसी घटना घटी जिसने मुझे कुछ सोचने पे मजबूर कर दिया। खाना खा रहा था और laptop पे TVF का एक video देख रहा था. रोटी के कोर मटर-पनीर में डूब के बाहर निकलते और फिर कब मैं उन्हें खा ले रहा था, ये पता नहीं चलता क्यूंकि सामने video चल रहा था। 

Encash the tariff war opportunity

Around 1st Mar'17, i received a call from Vodafone and the lady told me that Vodafone is offering a plan with 6 GB monthly data without any extra charge. Though i was happy to hear this but i was little skeptical too so i asked her to confirm and i asked twice. Fortunately, it was 'yes' both the times so i asked her to activate the new plan. When my billing period started, i received an SMS and that's when i realized i was being charged extra Rs.50 for this new plan. To vent out my frustration, i dropped a love letter to Vodafone and they immediately called me up. I directly asked them to restore my old plan but they told me that they cannot promise the same old benefits that i was getting in that plan (600 Local/STD mins and 3 GB data). I was like, एक तो यहाँ office का workload और अब यहाँ बैठे-बैठे एक नया स्याप्पा! I instantly applied for a port-out request. I again received a call but this time, Vodafone seemed in a 'Happy to help' you mode. I now have a new plan with lifetime validity of 10 GB data/month and unlimited calling. Love you Vodafone! :P

Facebook replies on whether it's making your posts public tomorrow

Recently, i've been seeing a lot of posts on many of my friends' timeline about Facebook (FB) going to make all posts public. Most of the messages were more or less identical to the following:



Unable to send mail - dsn=5.6.0, stat=Data format error

I had written a script which performs branch merge and notifies users in case of any merge conflict. This was working fine but stopped working few days back. On checking logs (/var/log/maillog), i could see the following:


Point to note here was dsn=5.6.0, stat=Data format error where dsn stands for Delivery Status Notification.

Aerospike error : dropping incoming client connection: hit limit...

Recently, i came across an issue where an application was not able to connect to Aerospike database. The first thing i did was to check whether Aerospike was running.

1
2
3
[root@aerospike3 gc]# ps -ef | grep asd
root     11854     1  8 Sep26 ?        10:25:55 /usr/bin/asd
root     32732 32686  0 16:29 pts/0    00:00:00 grep asd

After i confirmed that it was running, i then tried doing a telnet to the listening port and that's when i saw the problem.

1
2
3
4
5
[root@aerospike3 gc]# telnet 127.0.0.1 3000
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Connection closed by foreign host.