I want to get the Operating System that I'm running on inside a Docker.
This is what my docker-compose
looks like and I'm inheriting from the python:2.7
image
version: '2'
services:
robot-configuration-interface:
build: '.'
restart: always
network_mode: 'host'
ports:
- 8000:80
environment:
- REDIS_HOST=localhost
- DEBUG=true
volumes:
- ~/logs/fetchcore-server:/var/log/supervisor
- /var/run/docker.sock:/var/run/docker.sock
- /opt/ros/indigo:/opt/ros/indigo
- /etc/environment:/etc/environment
- /etc/NetworkManager/system-connections/:/etc/NetworkManager/system-connections/
- /lib:/lib
- /usr/lib/:/usr/lib
- /usr/bin/:/usr/bin/
- /var/run/:/var/run/
privileged: true
user: root
The lsb_release -d
command returns Debian GNU/Linux 8.7 (n/a) instead of
Ubuntu 14.04.5 LTS even though i'm mounting /usr/bin
LSB is kind of deprecated/ignored on Debian-based distributions, and the file is not present in the Docker images of the most popular distros.
/etc/os-release is prefered now. You can see that this file is present on the Docker images of a lot of distributions (even Alpine), which is not the case with /etc/lsb-release.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With