Run the container with:
--cap-add sys_admin --cap-add sys_ptrace
Within the container:
apt-get strace
Run the container with:
--cap-add sys_admin --cap-add sys_ptrace
Within the container:
apt-get strace
Like done in the official nginx docker image:
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
>>> import secrets
>>> import string
>>> print(''.join(secrets.choice(string.digits + string.ascii_letters + string.punctuation) for i in range(100)))
*:}~{MH)D&e}SGYRcAO~Q}PFD@:bN$6\d2&A7VB.ge2<zGda5J#)(p>>_H5l*Z>Q9R+!lZ&yn-th2^0ZUf|tkQS8zQu&5+THw&}C
PURPOSE | ALPINE | DEBIAN / UBUNTU | CENTOS/RHEL |
---|---|---|---|
PostgreSQL | postgresql-dev | libpq-dev | |
MySQL / MariaDB | mariadb-dev | libmysqlclient-dev/ libmariadbclient-dev | |
Imagemagick | imagemagick-dev | imagemagick | |
bcrypt | libffi-dev | libffi-dev | |
ps | procpsbusybox | procps | procps |
Redirect stdout to one file and stderr to another file:
command > out 2>error
Redirect stderr to stdout (&1), and then redirect stdout to a file:
command >out 2>&1
ssh-agent bash -c ' ssh-add ~/git_key/id_rsa; cd ~/some_git_repo; git pull'
$ namei -om ~/tmp/newnew/
f: /home/user/tmp/newnew/
drwxr-xr-x root root /
drwxr-xr-x root root home
drwxr-xr-x user user user
drwxrwxr-x user user tmp
drwxrwxr-x user user newnew
docker cli
-it
docker-compose
stdin_open: true
tty: true
>>> a = 'world'
>>> b = b'hello '
>>> type(a)
<class 'str'>
>>> type(b)
<class 'bytes'>
What's new in python3 shows:
>>> str.encode(a)