[Docker] How to run docker without sudo

Hi,

These days I’m playing with docker using Amazon Web Services as server. For those who have already play with, you may have noticed that you always need to add “sudo” prefix to your command line to use it. It’s a bit annoying.

As it’s said in docker documentation, you need to add you to the docker group

I’m running Ubuntu Server 14.04 LTS.

sudo gpasswd -a "USER" docker

Log out, go back in and restart docker daemon

sudo service docker restart

Now you can run docker without “sudo”

Error Trick

Here is a little trick in golang

To generate error message of type “Error” I usually do this :

package main 
   
import (
    "fmt"
    "errors"
) 

func GetError(status bool) error {
    if status {
        return errors.New("Ohh yeah here is my error")
    }
    return nil
}

func main() {
    fmt.Println(GetError(true))
}

Go Playground

But fmt package contains an usefull function “Errorf” that allows me to directly generate a type “Error”.

package main 
   
import (
    "fmt"
) 

func GetError(status bool) error {
    if status {
        return fmt.Errotf("Ohh yeah here is my error")
    }
    return nil
}

func main() {
    fmt.Println(GetError(true))
}

Go Playground Not awesome but might be helpful Thanks for reading :D

[Chronic] ANSSI Challenge

Hi,

Today I will introduce one of my hobbies as developper, Security Hacking.

I could describe my level as “non ignorant” but as my English I need practice. Now I choosed a challenge produced by French Government called “ANSSI” which means Nationnal Agency of Information Systems Security. This challenge is similar to CIA challenge Kryptos but the difference is that ANSSI challenge has been resolved in 2 years and Krytos is not yet.

So the only thing I need to begin is this picture and all my knowledges in cryptography and steganography

image

Honestly, I don’t think this chronic will end but let’s try :)

To be continued ….

tumblr init

Hi,

Why am i moving again ? Well i have always heard about tumblr, some of my friends are writing on and they do it very well. But I never tried, so now it’s time. I have never been very active since the beginning, I hope it will be better here.

Again I apologize for my English, I need practice :)

Thanks for reading and have a nice day