Official Docker image for Ubuntu Server?












13















All I could find is an official Docker image for Ubuntu Desktop on Docker Hub. Isn't there one for Ubuntu Server?



Does that mean, I'd have to create my own base image using scratch?










share|improve this question























  • @markkirby Isn't Ubuntu Server a stripped down version of Ubuntu Desktop plus optimizations tailored for the server? If yes, that's why. I don't understand what you are trying to say.

    – its_me
    Dec 9 '15 at 9:23











  • Check out my answer - I set up an ubuntu server container :) it's easy

    – NonCreature0714
    Dec 24 '17 at 22:01
















13















All I could find is an official Docker image for Ubuntu Desktop on Docker Hub. Isn't there one for Ubuntu Server?



Does that mean, I'd have to create my own base image using scratch?










share|improve this question























  • @markkirby Isn't Ubuntu Server a stripped down version of Ubuntu Desktop plus optimizations tailored for the server? If yes, that's why. I don't understand what you are trying to say.

    – its_me
    Dec 9 '15 at 9:23











  • Check out my answer - I set up an ubuntu server container :) it's easy

    – NonCreature0714
    Dec 24 '17 at 22:01














13












13








13


5






All I could find is an official Docker image for Ubuntu Desktop on Docker Hub. Isn't there one for Ubuntu Server?



Does that mean, I'd have to create my own base image using scratch?










share|improve this question














All I could find is an official Docker image for Ubuntu Desktop on Docker Hub. Isn't there one for Ubuntu Server?



Does that mean, I'd have to create my own base image using scratch?







server docker






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 9 '15 at 6:31









its_meits_me

1,31231627




1,31231627













  • @markkirby Isn't Ubuntu Server a stripped down version of Ubuntu Desktop plus optimizations tailored for the server? If yes, that's why. I don't understand what you are trying to say.

    – its_me
    Dec 9 '15 at 9:23











  • Check out my answer - I set up an ubuntu server container :) it's easy

    – NonCreature0714
    Dec 24 '17 at 22:01



















  • @markkirby Isn't Ubuntu Server a stripped down version of Ubuntu Desktop plus optimizations tailored for the server? If yes, that's why. I don't understand what you are trying to say.

    – its_me
    Dec 9 '15 at 9:23











  • Check out my answer - I set up an ubuntu server container :) it's easy

    – NonCreature0714
    Dec 24 '17 at 22:01

















@markkirby Isn't Ubuntu Server a stripped down version of Ubuntu Desktop plus optimizations tailored for the server? If yes, that's why. I don't understand what you are trying to say.

– its_me
Dec 9 '15 at 9:23





@markkirby Isn't Ubuntu Server a stripped down version of Ubuntu Desktop plus optimizations tailored for the server? If yes, that's why. I don't understand what you are trying to say.

– its_me
Dec 9 '15 at 9:23













Check out my answer - I set up an ubuntu server container :) it's easy

– NonCreature0714
Dec 24 '17 at 22:01





Check out my answer - I set up an ubuntu server container :) it's easy

– NonCreature0714
Dec 24 '17 at 22:01










6 Answers
6






active

oldest

votes


















8















All I could find is an official Docker image for Ubuntu Desktop on Docker Hub.




Nowhere does that page say that it's an Ubuntu Desktop image. Anyway, that wouldn't make sense because you (generally) don't run a desktop environment in a Docker container.






share|improve this answer
























  • Agreed, that was my thoughts, the OP assumed it was for desktop, but nowhere does it actually say that.

    – Mark Kirby
    Dec 9 '15 at 11:09






  • 1





    Andreas and @markkirby - Yeah, it sure seems obvious now; didn't occur to me earlier. I thought it's a desktop distribution based on the description, "What is Ubuntu? -- Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment."

    – its_me
    Dec 9 '15 at 16:24






  • 1





    @its_me Don't worrie about it, you should see some of the ridiculous questions I have asked in the past, at the time they seem good, but we all make mistakes :)

    – Mark Kirby
    Dec 9 '15 at 16:51





















11














You can test it, first run bash in Ubuntu container by:



docker run -it ubuntu /bin/bash



-i, --interactive Keep STDIN open even if not attached



-t, --tty Allocate a pseudo-TTY




Then run following command to check if ubuntu-desktop is installed:



dpkg -l ubuntu-desktop





share|improve this answer





















  • 1





    This is the real answer. And confirmed that ubuntu-desktop is not installed in the Docker official ubuntu image.

    – wisbucky
    Jul 7 '17 at 22:18











  • I've run it on my personal ubuntu desktop. Result: dpkg-query: no packages found matching ubuntu-desktop ;P

    – Waldemar Wosiński
    Nov 16 '17 at 8:37





















6














The question was about Ubuntu Server, but all the answers and discussion were about Ubuntu Desktop. So I'll answer both, but address Ubuntu Desktop first. Finally, (and likely a not recommended for an ephemeral container, and most containers should be ephemeral per Docker's best practices, but hey, there's exceptions.) you can install Ubuntu Desktop and Ubuntu Server on a container and run it.





NOTE: You can add the --rm flag to keep your host's storage from bloating by automatically deleting containers after they run, if you're only experimenting with them.



docker run --rm -it ubuntu




Ubuntu Desktop Container



A running container



This is a pretty big container! ~ 1.5Gb



If you run:



docker run -it ubuntu


Then, in the container:



> apt-get update && apt-get install -y ubuntu-desktop


You'll effectively download the Ubuntu Desktop



Dockerfile for Ubuntu Desktop



A Dockerfile could be made:



FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y ubuntu-desktop


Then build it:



docker build -t ubuntu-desktop .


And run it:



docker run -it ubuntu-desktop




Ubuntu Server container



A running container



docker run -it ubuntu


From container terminal:



apt-get update && apt-get install -y ubuntu-server


Dockerfile for Ubuntu Server



FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y ubuntu-server


Build it:



docker build -t ubuntu-server .


Run it:



docker run -it ubuntu-server




Ubuntu Desktop and Server Container



A running container:



docker run -it ubuntu


The container's terminal:



apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


Dockerfile for Ubuntu Server/Desktop



FROM ubuntu:16.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


Build it:



docker build -t ubuntu-server-desktop .


Run it:



docker run -it ubuntu-server-desktop.





share|improve this answer

































    1














    They start with the cloudimg files as a base.



    If you look at the manifests for cloud images here it looks like it is the server deployment base image.






    share|improve this answer































      0














      To further clarify ghanbari answer. Here is the output of the commands. Definitly no packages regarding desktop.



      > docker pull ubuntu:latest
      > docker run -t -i ubuntu /bin/bash
      > dpkg -l ubuntu-desktop
      > dpkg-query: no packages found matching ubuntu-desktop





      share|improve this answer
























      • Just needs apt-get update.

        – simpleigh
        Jan 18 at 10:11



















      0














      IMHO, ubuntu desktop is mostly just ubuntu server + desktop environment. The official repo OP pointed at does not contain any images with the desktop environment so you should just treat them as the server versions.



      For minimalist, I currently use gcr.io/google_containers/ubuntu-slim:0.14 for my personal project. It is a minimal but fully functioning ubuntu image with only 1/3 the size of those official images.






      share|improve this answer























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f707621%2fofficial-docker-image-for-ubuntu-server%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        6 Answers
        6






        active

        oldest

        votes








        6 Answers
        6






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        8















        All I could find is an official Docker image for Ubuntu Desktop on Docker Hub.




        Nowhere does that page say that it's an Ubuntu Desktop image. Anyway, that wouldn't make sense because you (generally) don't run a desktop environment in a Docker container.






        share|improve this answer
























        • Agreed, that was my thoughts, the OP assumed it was for desktop, but nowhere does it actually say that.

          – Mark Kirby
          Dec 9 '15 at 11:09






        • 1





          Andreas and @markkirby - Yeah, it sure seems obvious now; didn't occur to me earlier. I thought it's a desktop distribution based on the description, "What is Ubuntu? -- Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment."

          – its_me
          Dec 9 '15 at 16:24






        • 1





          @its_me Don't worrie about it, you should see some of the ridiculous questions I have asked in the past, at the time they seem good, but we all make mistakes :)

          – Mark Kirby
          Dec 9 '15 at 16:51


















        8















        All I could find is an official Docker image for Ubuntu Desktop on Docker Hub.




        Nowhere does that page say that it's an Ubuntu Desktop image. Anyway, that wouldn't make sense because you (generally) don't run a desktop environment in a Docker container.






        share|improve this answer
























        • Agreed, that was my thoughts, the OP assumed it was for desktop, but nowhere does it actually say that.

          – Mark Kirby
          Dec 9 '15 at 11:09






        • 1





          Andreas and @markkirby - Yeah, it sure seems obvious now; didn't occur to me earlier. I thought it's a desktop distribution based on the description, "What is Ubuntu? -- Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment."

          – its_me
          Dec 9 '15 at 16:24






        • 1





          @its_me Don't worrie about it, you should see some of the ridiculous questions I have asked in the past, at the time they seem good, but we all make mistakes :)

          – Mark Kirby
          Dec 9 '15 at 16:51
















        8












        8








        8








        All I could find is an official Docker image for Ubuntu Desktop on Docker Hub.




        Nowhere does that page say that it's an Ubuntu Desktop image. Anyway, that wouldn't make sense because you (generally) don't run a desktop environment in a Docker container.






        share|improve this answer














        All I could find is an official Docker image for Ubuntu Desktop on Docker Hub.




        Nowhere does that page say that it's an Ubuntu Desktop image. Anyway, that wouldn't make sense because you (generally) don't run a desktop environment in a Docker container.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 9 '15 at 10:35









        Andreas VeithenAndreas Veithen

        84675




        84675













        • Agreed, that was my thoughts, the OP assumed it was for desktop, but nowhere does it actually say that.

          – Mark Kirby
          Dec 9 '15 at 11:09






        • 1





          Andreas and @markkirby - Yeah, it sure seems obvious now; didn't occur to me earlier. I thought it's a desktop distribution based on the description, "What is Ubuntu? -- Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment."

          – its_me
          Dec 9 '15 at 16:24






        • 1





          @its_me Don't worrie about it, you should see some of the ridiculous questions I have asked in the past, at the time they seem good, but we all make mistakes :)

          – Mark Kirby
          Dec 9 '15 at 16:51





















        • Agreed, that was my thoughts, the OP assumed it was for desktop, but nowhere does it actually say that.

          – Mark Kirby
          Dec 9 '15 at 11:09






        • 1





          Andreas and @markkirby - Yeah, it sure seems obvious now; didn't occur to me earlier. I thought it's a desktop distribution based on the description, "What is Ubuntu? -- Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment."

          – its_me
          Dec 9 '15 at 16:24






        • 1





          @its_me Don't worrie about it, you should see some of the ridiculous questions I have asked in the past, at the time they seem good, but we all make mistakes :)

          – Mark Kirby
          Dec 9 '15 at 16:51



















        Agreed, that was my thoughts, the OP assumed it was for desktop, but nowhere does it actually say that.

        – Mark Kirby
        Dec 9 '15 at 11:09





        Agreed, that was my thoughts, the OP assumed it was for desktop, but nowhere does it actually say that.

        – Mark Kirby
        Dec 9 '15 at 11:09




        1




        1





        Andreas and @markkirby - Yeah, it sure seems obvious now; didn't occur to me earlier. I thought it's a desktop distribution based on the description, "What is Ubuntu? -- Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment."

        – its_me
        Dec 9 '15 at 16:24





        Andreas and @markkirby - Yeah, it sure seems obvious now; didn't occur to me earlier. I thought it's a desktop distribution based on the description, "What is Ubuntu? -- Ubuntu is a Debian-based Linux operating system, with Unity as its default desktop environment."

        – its_me
        Dec 9 '15 at 16:24




        1




        1





        @its_me Don't worrie about it, you should see some of the ridiculous questions I have asked in the past, at the time they seem good, but we all make mistakes :)

        – Mark Kirby
        Dec 9 '15 at 16:51







        @its_me Don't worrie about it, you should see some of the ridiculous questions I have asked in the past, at the time they seem good, but we all make mistakes :)

        – Mark Kirby
        Dec 9 '15 at 16:51















        11














        You can test it, first run bash in Ubuntu container by:



        docker run -it ubuntu /bin/bash



        -i, --interactive Keep STDIN open even if not attached



        -t, --tty Allocate a pseudo-TTY




        Then run following command to check if ubuntu-desktop is installed:



        dpkg -l ubuntu-desktop





        share|improve this answer





















        • 1





          This is the real answer. And confirmed that ubuntu-desktop is not installed in the Docker official ubuntu image.

          – wisbucky
          Jul 7 '17 at 22:18











        • I've run it on my personal ubuntu desktop. Result: dpkg-query: no packages found matching ubuntu-desktop ;P

          – Waldemar Wosiński
          Nov 16 '17 at 8:37


















        11














        You can test it, first run bash in Ubuntu container by:



        docker run -it ubuntu /bin/bash



        -i, --interactive Keep STDIN open even if not attached



        -t, --tty Allocate a pseudo-TTY




        Then run following command to check if ubuntu-desktop is installed:



        dpkg -l ubuntu-desktop





        share|improve this answer





















        • 1





          This is the real answer. And confirmed that ubuntu-desktop is not installed in the Docker official ubuntu image.

          – wisbucky
          Jul 7 '17 at 22:18











        • I've run it on my personal ubuntu desktop. Result: dpkg-query: no packages found matching ubuntu-desktop ;P

          – Waldemar Wosiński
          Nov 16 '17 at 8:37
















        11












        11








        11







        You can test it, first run bash in Ubuntu container by:



        docker run -it ubuntu /bin/bash



        -i, --interactive Keep STDIN open even if not attached



        -t, --tty Allocate a pseudo-TTY




        Then run following command to check if ubuntu-desktop is installed:



        dpkg -l ubuntu-desktop





        share|improve this answer















        You can test it, first run bash in Ubuntu container by:



        docker run -it ubuntu /bin/bash



        -i, --interactive Keep STDIN open even if not attached



        -t, --tty Allocate a pseudo-TTY




        Then run following command to check if ubuntu-desktop is installed:



        dpkg -l ubuntu-desktop






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 15 at 20:44









        Pablo Bianchi

        2,4851532




        2,4851532










        answered Jul 1 '16 at 15:43









        ghanbarighanbari

        21125




        21125








        • 1





          This is the real answer. And confirmed that ubuntu-desktop is not installed in the Docker official ubuntu image.

          – wisbucky
          Jul 7 '17 at 22:18











        • I've run it on my personal ubuntu desktop. Result: dpkg-query: no packages found matching ubuntu-desktop ;P

          – Waldemar Wosiński
          Nov 16 '17 at 8:37
















        • 1





          This is the real answer. And confirmed that ubuntu-desktop is not installed in the Docker official ubuntu image.

          – wisbucky
          Jul 7 '17 at 22:18











        • I've run it on my personal ubuntu desktop. Result: dpkg-query: no packages found matching ubuntu-desktop ;P

          – Waldemar Wosiński
          Nov 16 '17 at 8:37










        1




        1





        This is the real answer. And confirmed that ubuntu-desktop is not installed in the Docker official ubuntu image.

        – wisbucky
        Jul 7 '17 at 22:18





        This is the real answer. And confirmed that ubuntu-desktop is not installed in the Docker official ubuntu image.

        – wisbucky
        Jul 7 '17 at 22:18













        I've run it on my personal ubuntu desktop. Result: dpkg-query: no packages found matching ubuntu-desktop ;P

        – Waldemar Wosiński
        Nov 16 '17 at 8:37







        I've run it on my personal ubuntu desktop. Result: dpkg-query: no packages found matching ubuntu-desktop ;P

        – Waldemar Wosiński
        Nov 16 '17 at 8:37













        6














        The question was about Ubuntu Server, but all the answers and discussion were about Ubuntu Desktop. So I'll answer both, but address Ubuntu Desktop first. Finally, (and likely a not recommended for an ephemeral container, and most containers should be ephemeral per Docker's best practices, but hey, there's exceptions.) you can install Ubuntu Desktop and Ubuntu Server on a container and run it.





        NOTE: You can add the --rm flag to keep your host's storage from bloating by automatically deleting containers after they run, if you're only experimenting with them.



        docker run --rm -it ubuntu




        Ubuntu Desktop Container



        A running container



        This is a pretty big container! ~ 1.5Gb



        If you run:



        docker run -it ubuntu


        Then, in the container:



        > apt-get update && apt-get install -y ubuntu-desktop


        You'll effectively download the Ubuntu Desktop



        Dockerfile for Ubuntu Desktop



        A Dockerfile could be made:



        FROM ubuntu:16.04
        ENV DEBIAN_FRONTEND noninteractive
        RUN apt-get update && apt-get install -y ubuntu-desktop


        Then build it:



        docker build -t ubuntu-desktop .


        And run it:



        docker run -it ubuntu-desktop




        Ubuntu Server container



        A running container



        docker run -it ubuntu


        From container terminal:



        apt-get update && apt-get install -y ubuntu-server


        Dockerfile for Ubuntu Server



        FROM ubuntu:16.04
        ENV DEBIAN_FRONTEND noninteractive
        RUN apt-get update && apt-get install -y ubuntu-server


        Build it:



        docker build -t ubuntu-server .


        Run it:



        docker run -it ubuntu-server




        Ubuntu Desktop and Server Container



        A running container:



        docker run -it ubuntu


        The container's terminal:



        apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


        Dockerfile for Ubuntu Server/Desktop



        FROM ubuntu:16.04
        ENV DEBIAN_FRONTEND noninteractive
        RUN apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


        Build it:



        docker build -t ubuntu-server-desktop .


        Run it:



        docker run -it ubuntu-server-desktop.





        share|improve this answer






























          6














          The question was about Ubuntu Server, but all the answers and discussion were about Ubuntu Desktop. So I'll answer both, but address Ubuntu Desktop first. Finally, (and likely a not recommended for an ephemeral container, and most containers should be ephemeral per Docker's best practices, but hey, there's exceptions.) you can install Ubuntu Desktop and Ubuntu Server on a container and run it.





          NOTE: You can add the --rm flag to keep your host's storage from bloating by automatically deleting containers after they run, if you're only experimenting with them.



          docker run --rm -it ubuntu




          Ubuntu Desktop Container



          A running container



          This is a pretty big container! ~ 1.5Gb



          If you run:



          docker run -it ubuntu


          Then, in the container:



          > apt-get update && apt-get install -y ubuntu-desktop


          You'll effectively download the Ubuntu Desktop



          Dockerfile for Ubuntu Desktop



          A Dockerfile could be made:



          FROM ubuntu:16.04
          ENV DEBIAN_FRONTEND noninteractive
          RUN apt-get update && apt-get install -y ubuntu-desktop


          Then build it:



          docker build -t ubuntu-desktop .


          And run it:



          docker run -it ubuntu-desktop




          Ubuntu Server container



          A running container



          docker run -it ubuntu


          From container terminal:



          apt-get update && apt-get install -y ubuntu-server


          Dockerfile for Ubuntu Server



          FROM ubuntu:16.04
          ENV DEBIAN_FRONTEND noninteractive
          RUN apt-get update && apt-get install -y ubuntu-server


          Build it:



          docker build -t ubuntu-server .


          Run it:



          docker run -it ubuntu-server




          Ubuntu Desktop and Server Container



          A running container:



          docker run -it ubuntu


          The container's terminal:



          apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


          Dockerfile for Ubuntu Server/Desktop



          FROM ubuntu:16.04
          ENV DEBIAN_FRONTEND noninteractive
          RUN apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


          Build it:



          docker build -t ubuntu-server-desktop .


          Run it:



          docker run -it ubuntu-server-desktop.





          share|improve this answer




























            6












            6








            6







            The question was about Ubuntu Server, but all the answers and discussion were about Ubuntu Desktop. So I'll answer both, but address Ubuntu Desktop first. Finally, (and likely a not recommended for an ephemeral container, and most containers should be ephemeral per Docker's best practices, but hey, there's exceptions.) you can install Ubuntu Desktop and Ubuntu Server on a container and run it.





            NOTE: You can add the --rm flag to keep your host's storage from bloating by automatically deleting containers after they run, if you're only experimenting with them.



            docker run --rm -it ubuntu




            Ubuntu Desktop Container



            A running container



            This is a pretty big container! ~ 1.5Gb



            If you run:



            docker run -it ubuntu


            Then, in the container:



            > apt-get update && apt-get install -y ubuntu-desktop


            You'll effectively download the Ubuntu Desktop



            Dockerfile for Ubuntu Desktop



            A Dockerfile could be made:



            FROM ubuntu:16.04
            ENV DEBIAN_FRONTEND noninteractive
            RUN apt-get update && apt-get install -y ubuntu-desktop


            Then build it:



            docker build -t ubuntu-desktop .


            And run it:



            docker run -it ubuntu-desktop




            Ubuntu Server container



            A running container



            docker run -it ubuntu


            From container terminal:



            apt-get update && apt-get install -y ubuntu-server


            Dockerfile for Ubuntu Server



            FROM ubuntu:16.04
            ENV DEBIAN_FRONTEND noninteractive
            RUN apt-get update && apt-get install -y ubuntu-server


            Build it:



            docker build -t ubuntu-server .


            Run it:



            docker run -it ubuntu-server




            Ubuntu Desktop and Server Container



            A running container:



            docker run -it ubuntu


            The container's terminal:



            apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


            Dockerfile for Ubuntu Server/Desktop



            FROM ubuntu:16.04
            ENV DEBIAN_FRONTEND noninteractive
            RUN apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


            Build it:



            docker build -t ubuntu-server-desktop .


            Run it:



            docker run -it ubuntu-server-desktop.





            share|improve this answer















            The question was about Ubuntu Server, but all the answers and discussion were about Ubuntu Desktop. So I'll answer both, but address Ubuntu Desktop first. Finally, (and likely a not recommended for an ephemeral container, and most containers should be ephemeral per Docker's best practices, but hey, there's exceptions.) you can install Ubuntu Desktop and Ubuntu Server on a container and run it.





            NOTE: You can add the --rm flag to keep your host's storage from bloating by automatically deleting containers after they run, if you're only experimenting with them.



            docker run --rm -it ubuntu




            Ubuntu Desktop Container



            A running container



            This is a pretty big container! ~ 1.5Gb



            If you run:



            docker run -it ubuntu


            Then, in the container:



            > apt-get update && apt-get install -y ubuntu-desktop


            You'll effectively download the Ubuntu Desktop



            Dockerfile for Ubuntu Desktop



            A Dockerfile could be made:



            FROM ubuntu:16.04
            ENV DEBIAN_FRONTEND noninteractive
            RUN apt-get update && apt-get install -y ubuntu-desktop


            Then build it:



            docker build -t ubuntu-desktop .


            And run it:



            docker run -it ubuntu-desktop




            Ubuntu Server container



            A running container



            docker run -it ubuntu


            From container terminal:



            apt-get update && apt-get install -y ubuntu-server


            Dockerfile for Ubuntu Server



            FROM ubuntu:16.04
            ENV DEBIAN_FRONTEND noninteractive
            RUN apt-get update && apt-get install -y ubuntu-server


            Build it:



            docker build -t ubuntu-server .


            Run it:



            docker run -it ubuntu-server




            Ubuntu Desktop and Server Container



            A running container:



            docker run -it ubuntu


            The container's terminal:



            apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


            Dockerfile for Ubuntu Server/Desktop



            FROM ubuntu:16.04
            ENV DEBIAN_FRONTEND noninteractive
            RUN apt-get update && apt-get install -y ubuntu-server ubuntu-desktop


            Build it:



            docker build -t ubuntu-server-desktop .


            Run it:



            docker run -it ubuntu-server-desktop.






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 18 at 23:18

























            answered Dec 24 '17 at 21:12









            NonCreature0714NonCreature0714

            16114




            16114























                1














                They start with the cloudimg files as a base.



                If you look at the manifests for cloud images here it looks like it is the server deployment base image.






                share|improve this answer




























                  1














                  They start with the cloudimg files as a base.



                  If you look at the manifests for cloud images here it looks like it is the server deployment base image.






                  share|improve this answer


























                    1












                    1








                    1







                    They start with the cloudimg files as a base.



                    If you look at the manifests for cloud images here it looks like it is the server deployment base image.






                    share|improve this answer













                    They start with the cloudimg files as a base.



                    If you look at the manifests for cloud images here it looks like it is the server deployment base image.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 9 '15 at 7:18









                    RobotHumansRobotHumans

                    22.9k362104




                    22.9k362104























                        0














                        To further clarify ghanbari answer. Here is the output of the commands. Definitly no packages regarding desktop.



                        > docker pull ubuntu:latest
                        > docker run -t -i ubuntu /bin/bash
                        > dpkg -l ubuntu-desktop
                        > dpkg-query: no packages found matching ubuntu-desktop





                        share|improve this answer
























                        • Just needs apt-get update.

                          – simpleigh
                          Jan 18 at 10:11
















                        0














                        To further clarify ghanbari answer. Here is the output of the commands. Definitly no packages regarding desktop.



                        > docker pull ubuntu:latest
                        > docker run -t -i ubuntu /bin/bash
                        > dpkg -l ubuntu-desktop
                        > dpkg-query: no packages found matching ubuntu-desktop





                        share|improve this answer
























                        • Just needs apt-get update.

                          – simpleigh
                          Jan 18 at 10:11














                        0












                        0








                        0







                        To further clarify ghanbari answer. Here is the output of the commands. Definitly no packages regarding desktop.



                        > docker pull ubuntu:latest
                        > docker run -t -i ubuntu /bin/bash
                        > dpkg -l ubuntu-desktop
                        > dpkg-query: no packages found matching ubuntu-desktop





                        share|improve this answer













                        To further clarify ghanbari answer. Here is the output of the commands. Definitly no packages regarding desktop.



                        > docker pull ubuntu:latest
                        > docker run -t -i ubuntu /bin/bash
                        > dpkg -l ubuntu-desktop
                        > dpkg-query: no packages found matching ubuntu-desktop






                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Oct 27 '17 at 14:48









                        hotteheadhottehead

                        1




                        1













                        • Just needs apt-get update.

                          – simpleigh
                          Jan 18 at 10:11



















                        • Just needs apt-get update.

                          – simpleigh
                          Jan 18 at 10:11

















                        Just needs apt-get update.

                        – simpleigh
                        Jan 18 at 10:11





                        Just needs apt-get update.

                        – simpleigh
                        Jan 18 at 10:11











                        0














                        IMHO, ubuntu desktop is mostly just ubuntu server + desktop environment. The official repo OP pointed at does not contain any images with the desktop environment so you should just treat them as the server versions.



                        For minimalist, I currently use gcr.io/google_containers/ubuntu-slim:0.14 for my personal project. It is a minimal but fully functioning ubuntu image with only 1/3 the size of those official images.






                        share|improve this answer




























                          0














                          IMHO, ubuntu desktop is mostly just ubuntu server + desktop environment. The official repo OP pointed at does not contain any images with the desktop environment so you should just treat them as the server versions.



                          For minimalist, I currently use gcr.io/google_containers/ubuntu-slim:0.14 for my personal project. It is a minimal but fully functioning ubuntu image with only 1/3 the size of those official images.






                          share|improve this answer


























                            0












                            0








                            0







                            IMHO, ubuntu desktop is mostly just ubuntu server + desktop environment. The official repo OP pointed at does not contain any images with the desktop environment so you should just treat them as the server versions.



                            For minimalist, I currently use gcr.io/google_containers/ubuntu-slim:0.14 for my personal project. It is a minimal but fully functioning ubuntu image with only 1/3 the size of those official images.






                            share|improve this answer













                            IMHO, ubuntu desktop is mostly just ubuntu server + desktop environment. The official repo OP pointed at does not contain any images with the desktop environment so you should just treat them as the server versions.



                            For minimalist, I currently use gcr.io/google_containers/ubuntu-slim:0.14 for my personal project. It is a minimal but fully functioning ubuntu image with only 1/3 the size of those official images.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 28 '17 at 17:44









                            Yuhao ZhangYuhao Zhang

                            1




                            1






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f707621%2fofficial-docker-image-for-ubuntu-server%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                How to make a Squid Proxy server?

                                Is this a new Fibonacci Identity?

                                19世紀