hate these ads?, log in or register to hide them
Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 63

Thread: Docker - Hype or Help?

  1. #41
    Donor erichkknaar's Avatar
    Join Date
    April 9, 2011
    Posts
    9,943
    Quote Originally Posted by Hel OWeen View Post
    Quote Originally Posted by Tyrehl View Post
    I am very interested in docker, kubernetes and building applications that leverage the advantages of containers. You know, cloudŽ architecture and all. But since im a MS dev it feels like im swimming against the current. With dotnet core we can build the very same applications one could build in any other language, plop them in a linux container and build all the cool stuff people have been raving about the last couple of years.
    That'll change in the (near) future, I guess, as MS is integrating Docker into Windows Server: https://docs.microsoft.com/en-us/vir...windows-server
    Just remember that the windows implementation is a VM that is spawned to support the running of Docker containers. It will help you learn for sure, and may even be deployable into production, I honestly don't know. Just bear in mind that on Linux, docker is not actually a VM, and that has scaling implications.
    meh

  2. #42

    Join Date
    April 13, 2011
    Posts
    6,005
    There is a non-VM implementation but MS strongly recommend you don't actually use it, because they can't guarantee isolation.

  3. #43
    Lana Torrin's Avatar
    Join Date
    April 13, 2011
    Location
    Bonding around
    Posts
    18,302
    So all the tutorials for docker have you making scripts (in various languages). I assume its possible to make actual compiled apps for this as well? How much of a pain in the ass is that and are they binary compatible across systems?
    Quote Originally Posted by lubica
    And her name was Limul Azgoden, a lowly peasant girl.

  4. #44

    Join Date
    April 13, 2011
    Posts
    6,005
    Eh? Docker's not a programming language. The scripts you're seeing are just OS-level scripts that describe how to build a machine image.

  5. #45
    Donor erichkknaar's Avatar
    Join Date
    April 9, 2011
    Posts
    9,943
    Quote Originally Posted by Lana Torrin View Post
    So all the tutorials for docker have you making scripts (in various languages). I assume its possible to make actual compiled apps for this as well? How much of a pain in the ass is that and are they binary compatible across systems?
    If you are talking about a docker file, that is basically like the build instructions or a make file or something. Once that builds, then yes, the promise of docker is that that image will then reliably run everywhere docker runs, assuming you didn't bake bad dependencies into it or something.

    E:

    To expand on this:

    The normal workflow, at least where I have used docker in the past, is to have that docker file (and any other artifacts, which are normally scripts to to perhaps install and configure daemonizing tools and a start script that configures the application with environment variables that are passed in at launch time on the docker side, by templating them into config files when the container is launched. This normally also put the process in the foreground, and has it logging by writing to stdout and stderr.

    Note that if you are building your own software, its normally written to just do this now and we don't even bother with making a daemon process or anything anymore, its just a simple process that runs in the foreground and essentially printf's its way to glory.

    These scripts, config templates, Dockerfile which is the build instructions, like Use ubuntu, then install apache, mod_python, etc, then copy these files from the build directory into this directory in the image, then do this, etc, are all checked into version control along with source or whatever you are packaging, and then anytime something changes and gets checked into version control, you have a CI server take all that and build and test a docker image, which is then uploaded to a central repository, which all your kubernetes hosts or whatever pull from when instructed to run the image. This can safely deploy individual changes to a production environment in literally a couple of minutes, assuming you have a robust enough QA process, which takes effort, but pays off in spades.
    Last edited by erichkknaar; October 10 2017 at 03:30:37 PM.
    meh

  6. #46
    Dee Jiensai's Avatar
    Join Date
    February 23, 2012
    Posts
    334
    Quote Originally Posted by erichkknaar View Post
    Quote Originally Posted by Lana Torrin View Post
    So all the tutorials for docker have you making scripts (in various languages). I assume its possible to make actual compiled apps for this as well? How much of a pain in the ass is that and are they binary compatible across systems?
    If you are talking about a docker file, that is basically like the build instructions or a make file or something. Once that builds, then yes, the promise of docker is that that image will then reliably run everywhere docker runs, assuming you didn't bake bad dependencies into it or something.
    You do need to take binary compatibility into account though. images built on/for i686/amd64 wont run on ARM* etc.
    Although that is only really an issue in specific circumstances, like using docker on a Raspberry pi, or if you want to use some of those new-ish ARM-microserver services.

  7. #47
    Lana Torrin's Avatar
    Join Date
    April 13, 2011
    Location
    Bonding around
    Posts
    18,302
    Quote Originally Posted by Dee Jiensai View Post
    Quote Originally Posted by erichkknaar View Post
    Quote Originally Posted by Lana Torrin View Post
    So all the tutorials for docker have you making scripts (in various languages). I assume its possible to make actual compiled apps for this as well? How much of a pain in the ass is that and are they binary compatible across systems?
    If you are talking about a docker file, that is basically like the build instructions or a make file or something. Once that builds, then yes, the promise of docker is that that image will then reliably run everywhere docker runs, assuming you didn't bake bad dependencies into it or something.
    You do need to take binary compatibility into account though. images built on/for i686/amd64 wont run on ARM* etc.
    Although that is only really an issue in specific circumstances, like using docker on a Raspberry pi, or if you want to use some of those new-ish ARM-microserver services.
    That's what I was asking (or at least close enough)
    Quote Originally Posted by lubica
    And her name was Limul Azgoden, a lowly peasant girl.

  8. #48

    Join Date
    May 31, 2011
    Posts
    3,661
    Quote Originally Posted by erichkknaar View Post
    Quote Originally Posted by Hel OWeen View Post
    Quote Originally Posted by Tyrehl View Post
    I am very interested in docker, kubernetes and building applications that leverage the advantages of containers. You know, cloudŽ architecture and all. But since im a MS dev it feels like im swimming against the current. With dotnet core we can build the very same applications one could build in any other language, plop them in a linux container and build all the cool stuff people have been raving about the last couple of years.
    That'll change in the (near) future, I guess, as MS is integrating Docker into Windows Server: https://docs.microsoft.com/en-us/vir...windows-server
    Just remember that the windows implementation is a VM that is spawned to support the running of Docker containers. It will help you learn for sure, and may even be deployable into production, I honestly don't know. Just bear in mind that on Linux, docker is not actually a VM, and that has scaling implications.
    My understanding from various articles (i.e. https://arstechnica.com/information-...ver-2016-beta/) is that MS aims to really have full container support and utilize Docker to manage those:
    Quote Originally Posted by TFA
    Whichever form of container is being used, Windows Server 2016 will support using Docker to manage and deploy containers. Microsoft is continuing to work with Docker (including making open source contributions) to make Windows into a first-class platform for using containerized software.

  9. #49
    Donor erichkknaar's Avatar
    Join Date
    April 9, 2011
    Posts
    9,943
    Also bear in mind ass you all get into this that docker is not the only game in town (although by far the most adopted one)

    https://www.opencontainers.org/

    As far as binary compatibility goes,. that really follows the rest of open source. Because docker is essentially some packaging around stuff that the kernel is doing, you obviously need to be running the kernel for the correct processor architecture. This will normally involve building a version of your package for that architecture, as you would with say an RPM or apt package.
    meh

  10. #50
    Dee Jiensai's Avatar
    Join Date
    February 23, 2012
    Posts
    334
    Quote Originally Posted by Lana Torrin View Post
    Quote Originally Posted by Dee Jiensai View Post
    Quote Originally Posted by erichkknaar View Post
    Quote Originally Posted by Lana Torrin View Post
    So all the tutorials for docker have you making scripts (in various languages). I assume its possible to make actual compiled apps for this as well? How much of a pain in the ass is that and are they binary compatible across systems?
    If you are talking about a docker file, that is basically like the build instructions or a make file or something. Once that builds, then yes, the promise of docker is that that image will then reliably run everywhere docker runs, assuming you didn't bake bad dependencies into it or something.
    You do need to take binary compatibility into account though. images built on/for i686/amd64 wont run on ARM* etc.
    Although that is only really an issue in specific circumstances, like using docker on a Raspberry pi, or if you want to use some of those new-ish ARM-microserver services.
    That's what I was asking (or at least close enough)
    That said, apparently you can do this: https://resin.io/blog/building-arm-c...ven-dockerhub/

  11. #51

    Join Date
    April 13, 2011
    Posts
    6,005
    There was a docker PS guy working with my customer today. Their corporate hoodies are really nice.

  12. #52
    Donor erichkknaar's Avatar
    Join Date
    April 9, 2011
    Posts
    9,943
    Quote Originally Posted by elmicker View Post
    There was a docker PS guy working with my customer today. Their corporate hoodies are really nice.
    We had coreOS in when they were just a wee startup once. Good blokes.
    meh

  13. #53
    Frug's Avatar
    Join Date
    April 9, 2011
    Location
    Canada
    Posts
    13,687
    Docker is one of the few good things in this world.

    Quote Originally Posted by Loire
    I'm too stupid to say anything that deserves being in your magnificent signature.

  14. #54
    root's Avatar
    Join Date
    April 26, 2011
    Location
    The Camel Empire
    Posts
    3,051
    I'm newb to docker and need some workflow help
    Java, maven and docker. I edit the code, tell maven to build a new .jar file .. and then I somehow want to have it in a docker container on a remote mashine.

    Current workflow:
    Code:
    mvn compile
    sudo docker build -t marsel:latest .
    sudo docker save -o marsel.tar marsel:latest
    scp marsel.tar foo@bar:~/Downloads/docker/
    And then remote:
    Code:
    docker load -i marsel.tar
    But that is messy, as I now have an additional docker thingy on the remote mashine. I kinda just want the latest code. Though having a snapshot of the old would be nice.

    Dockerfile
    Code:
    FROM openjdk:8-jre-alpine
    COPY target/marsel-1.0-SNAPSHOT.jar /app.jar
    COPY configHackinit.txt /config.txt
    CMD ["/usr/bin/java", "-jar", "/app.jar", "/config.txt"]
    The Rapier is my love boat
    ~lowsec smallscale pvp 'n stuff~

  15. #55
    Dee Jiensai's Avatar
    Join Date
    February 23, 2012
    Posts
    334
    Quote Originally Posted by root View Post
    I'm newb to docker and need some workflow help
    Java, maven and docker. I edit the code, tell maven to build a new .jar file .. and then I somehow want to have it in a docker container on a remote mashine.

    Current workflow:
    Code:
    mvn compile
    sudo docker build -t marsel:latest .
    sudo docker save -o marsel.tar marsel:latest
    scp marsel.tar foo@bar:~/Downloads/docker/
    And then remote:
    Code:
    docker load -i marsel.tar
    But that is messy, as I now have an additional docker thingy on the remote mashine. I kinda just want the latest code. Though having a snapshot of the old would be nice.

    Dockerfile
    Code:
    FROM openjdk:8-jre-alpine
    COPY target/marsel-1.0-SNAPSHOT.jar /app.jar
    COPY configHackinit.txt /config.txt
    CMD ["/usr/bin/java", "-jar", "/app.jar", "/config.txt"]
    you need to look into something called Docker registry.
    I am currently researching a similar use, and I don't have it running yet, so i can only give yo general pointers.

    The docker registry comes in 2 flavors: the official/public docker registry and a service you can run privately
    both are basically the same, but one is hosted publicly by docker and is the source of base images you use in dockerfiles (i.e. the "FROM openjdk:8-jre-alpine" line)

    You can (and probably should) run this service yourself, and push images to it, and refer to them by name and tag you assign.

    I could put some links here, but best just google it, the official documentation seems ok, but as someone new to docker, I find myself googling a lot of context information to actually understand how to use the things you see in the docker docs.

  16. #56
    Donor erichkknaar's Avatar
    Join Date
    April 9, 2011
    Posts
    9,943
    Quote Originally Posted by Dee Jiensai View Post
    Quote Originally Posted by root View Post
    I'm newb to docker and need some workflow help
    Java, maven and docker. I edit the code, tell maven to build a new .jar file .. and then I somehow want to have it in a docker container on a remote mashine.

    Current workflow:
    Code:
    mvn compile
    sudo docker build -t marsel:latest .
    sudo docker save -o marsel.tar marsel:latest
    scp marsel.tar foo@bar:~/Downloads/docker/
    And then remote:
    Code:
    docker load -i marsel.tar
    But that is messy, as I now have an additional docker thingy on the remote mashine. I kinda just want the latest code. Though having a snapshot of the old would be nice.

    Dockerfile
    Code:
    FROM openjdk:8-jre-alpine
    COPY target/marsel-1.0-SNAPSHOT.jar /app.jar
    COPY configHackinit.txt /config.txt
    CMD ["/usr/bin/java", "-jar", "/app.jar", "/config.txt"]
    you need to look into something called Docker registry.
    I am currently researching a similar use, and I don't have it running yet, so i can only give yo general pointers.

    The docker registry comes in 2 flavors: the official/public docker registry and a service you can run privately
    both are basically the same, but one is hosted publicly by docker and is the source of base images you use in dockerfiles (i.e. the "FROM openjdk:8-jre-alpine" line)

    You can (and probably should) run this service yourself, and push images to it, and refer to them by name and tag you assign.

    I could put some links here, but best just google it, the official documentation seems ok, but as someone new to docker, I find myself googling a lot of context information to actually understand how to use the things you see in the docker docs.
    We found https://quay.io to be a good, functional private docker registry (for pay) that also happened to pass my last jobs rather paranoid security audit, if you don't necessarily want to go on premises with it.
    meh

  17. #57
    Frug's Avatar
    Join Date
    April 9, 2011
    Location
    Canada
    Posts
    13,687
    GitLab has a built in docker registry if you want to run that locally. Never tried it. Probably works 'fine'.

    Quote Originally Posted by Loire
    I'm too stupid to say anything that deserves being in your magnificent signature.

  18. #58
    root's Avatar
    Join Date
    April 26, 2011
    Location
    The Camel Empire
    Posts
    3,051
    Thanks Dee Jiensai
    Google told me I can make my own repo with a single docker command.
    Another one pushes the thingy to it. That should be enough.
    The Rapier is my love boat
    ~lowsec smallscale pvp 'n stuff~

  19. #59
    Tyrehl's Avatar
    Join Date
    April 9, 2011
    Location
    [STUGH] Rote Kapelle
    Posts
    3,693
    Currently on the same train, figuring out how best to prep a showcase and automate docker image generation and kubernetes. Its fun at the very least :>
    <Devec> hello captain Tyrehl
    <Devec> sailor of the persian seas
    Quote Originally Posted by Paradox
    I swear you are some sort of biological weapon developed in the early '90's for the Yugoslav wars but they lost track of you at some point and now you're waging a psychological war on Western Europe without a clue what you're doing.

  20. #60
    root's Avatar
    Join Date
    April 26, 2011
    Location
    The Camel Empire
    Posts
    3,051
    Ok, I made my own little docker repo. The hard part was making it work without SSL certificate.

    Now I run this script:
    Code:
    #!/bin/sh
    set -e
    
    mvn install
    docker build -t marsel:latest .
    docker tag -f marsel localhost:5000/marsel
    docker push localhost:5000/marsel
    I also found a maven plugin that does all of that. Maybe for a later time.

    On the serverside I have:
    docker-compose pull ;and docker-compose up -d --no-deps
    That will pull new images and only restart whatever got updated.
    The Rapier is my love boat
    ~lowsec smallscale pvp 'n stuff~

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •