Skip navigation

Category Archives: Uncategorised

Sometimes you need to connect to the docker engine without direct access to the console – whether remotely via TCP or via an application (such as Eclipse).

To do this, we must enable a listener in the Docker daemon. To do this, we have to create an overrides file for sysctl, adding the extra required startup parameters.

I’m assuming a RHEL 7 based system (should work well on RHEL, CentOS, Fedora)..

1) Create the following directory

/etc/systemd/system/docker.service.d/

2) Create an overrides file for the socket (can be named anything, and you can have multiple files)

I created the file:  daemon.conf with the following entries:

[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// -H unix:///var/run/docker.sock

This creates a local unix socket that my Eclipse instance can connect to and interact with the docker service using REST apis.

You can see the default service configuration in this file: /lib/systemd/system/docker.service

3) Reload sysctl config

$ systemctl daemon-reload

4) Configure your user

sudo usermod -aG docker rkpatel

This adds my user(rkpatel) to the docker group, which owns the socket. This also allows you to run docker commands without issuing sudo.

You may need to log out/in before the changes are fully realised.

NOTE: This does elevate your user account privileges and it may be possible to access some files previously accessible to only root.- check the docker documentation for full details.

Everyone seems to be having their accounts hacked recently, so here’s some fairly simple things that you can do to make sure your accounts are secure:

  1. Check that you’re not logged in from anywhere strange. Most sites will have a page where you can see all the places/devices you’re currently logged in, and let you log-out from them.
  2. Check your recovery options
    So you can get back in your account if you get locked out
  3. Enable 2-Factor-Authentication (2FA) Sounds technical, but you’ve probably used it already in some way: Some of you may have a VPN token (or app) you need to use to connect to your work network, or your bank has smsed you a pin number to log in to your account.
    2FA just means a second pin number you use log into your account (after your normal username/password), whenever you log in from somewhere unrecognised. it’s normally a 6-digit pin which gets sent to you via sms, email – or you can have an app which generates a pin, which is only valid for 60 seconds.

 

Gmail

Google has a set of tools to check the security of your account. Go to https://myaccount.google.com/security to get started.

Some things you can do from here:

  • Security Check-up – follow wizard to check security of your accounts
  • Review where you’re logged in to your account
  • Enable 2-Factor-Authentication
  • Set up account recovery contacts (email / phone)

Facebook

Facebook has several options to help secure your account, but you need to dig through the settings to enable them.

  • Review where you’re logged in
  • Enable 2-Factor Authentication
  • Trusted contacts – people that initiate a password reset, if you get locked out

1) Go to Settings (https://www.facebook.com/settings?tab=security)

 

2) Click “Security and login” from the side menu

Review where you’re logged in

Check all the places you’re currently logged in.

Use the submenu on each item (the three dots on the right) to logout of any old sessions, or report any logins which are not by you.

Two Factor Authentication

Click ‘Edit’ to enable the 2FA options

 

You’ll be asked to re-enter your password, then you’ll see options to add how you want to get your 2FA codes – by sms or App.

From now on, whenever you log in from a new location, you’ll have to enter this secondary password. Even if someone hacks your main password, it should be near impossible to get passed this second security check.

twitter

https://twitter.com/settings/account

Make sure that Reset Verification is enabled, and then review your login verification methods..

 

Here you can enable SMS codes or Mobile app codes

 

Amazon

Ensure that your contact details are correct (Your Account –> Login & security )

Go to “Advanced Security Settings”, and you can set up authenticatior app / sms codes.