Verify the version of ubuntu running in a Docker container

后端 未结 2 1205
执笔经年
执笔经年 2021-02-05 04:52

I have Docker Toolbox installed on windows 8.1 and I am creating an image based on ubuntu:latest (which should be 16.04). I want to make sure that my application is indeed run o

2条回答
  •  说谎
    说谎 (楼主)
    2021-02-05 05:10

    Try this

    cat /etc/os-release
    

    It will return like this

    NAME="Ubuntu"
    VERSION="16.04.3 LTS (Xenial Xerus)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 16.04.3 LTS"
    VERSION_ID="16.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    VERSION_CODENAME=xenial
    UBUNTU_CODENAME=xenial
    

提交回复
热议问题