MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Dockerfile setup [closed]

    Tutorials
    3
    2
    84
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tejaswini last edited by sdetweil

      I am not proficient in docker and js, so I have this file as a dockerfile and there are some instructions,

      FROM <company_name>/stratus/app-node:16.13.0
      
      COPY . .
      
      # When this Dockerfile is built (with "docker build .") the base "app-node" image will:
      # - Copy files from this directory into /app on the image
      # - Run npm install from /app
      
      # When resulting image is run (with "docker run"):
      # - Set $COMPANY_ENVIRONMENT to one of these values test, int, prod (defaults to "dev", set it with "-e COMPANY_ENVIRONMENT=<env>")
      # - Start the app with "npm start"
      

      so how are supposed to look like commands for this file?

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @tejaswini last edited by

        @tejaswini docker is creating little virtual machines that can do just about anything. generally, with docker you can compartmentalize what used to be all in one system
        into separate containers.

        web server
        database server
        application interface (API) server

        and then you can use compose to start them, connect them to ‘compose’ a ‘system’ from the parts

        but each image can be/is customized to its task…
        you don;t need the web stuff on the database server, and vice versa…

        the dockerfile is the image builders instructions for creating one of these parts.

        people/companies have created started images, that do some/most of a function,

        that is the from … what do u want to start with
        a web server
        a database server
        an app platform focused on python, java, matlab…

        an then you tell it where the data is (local inside the container, at some /folder path
        or external via some ‘mount’

        and u can do all kinds of things.

        one of the ‘cool’ things is that with a little thought, you can automatically scale the ‘system’ bigger by spinning up another web server or database or whatever…

        also, the stuff inside, web server using port 80, doesn’t KNOW that OUTSIDE in the host, it could be port 81, or 9000, or anything. so you can run multiple instances of the container image exactly the same, but different connections …

        so, the dockerfile has all the commands to do this kind of setup and launch the ‘one’ app/service the container is supposed to run.
        see the syntax for dockerfile (google, or some search engine, is your friend)

        Sam

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy