Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

192
Vistas
lsb_release of the host OS in a Docker

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

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

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.

over 4 years ago · Santiago Trujillo Denunciar

0

The answer is mounting /etc/lsb-release to the volumes

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda