2 Replies Latest reply on Apr 26, 2017 10:02 AM by jlyon-2 RSS
    jamesso Explorer

    Can the developer freemium edition of ThingWorx be run inside of docker?

    I did a search of the forum and got a small number of hits but nothing directly on the developer version that does not use Postgres.

     

    It is very easy to run tomcat in a container but I am not sure of the installation of ThingWorx. There is a need to have a self-signed certificate for example.

     

    Has anyone done the installation of the developer edition this way?

     

    One of the discussions in this forum had a message with an attached file of instructions for docker and ThingWorx but that link is broken now. And I think this applied to a full version of ThingWorx rather than the developer version.

     

    Any pointers appreciated.

     

    I will try to muddle through with an attempt to do this and will report back any success I have.

     

    I don't want to build my own dockerfile but use a docker-ized Tomcat container and then map folders on my host to the container filesystem using volume bindings; e.g. user a docker-compose yaml file.

     

    Jim

      • Re: Can the developer freemium edition of ThingWorx be run inside of docker?
        jamesso Explorer

        Well, using docker compose it was pretty easy -- no https though.

         

        Create a docker-compose.yml file like:

         

        TW_Test_jre8:

            image: tomcat:jre8

            ports:

               - "8080:8080"

            volumes:

               - ./ThingworxStorage:/ThingworxStorage

               - ./ThingworxBackupStorage:/ThingworxBackupStorage

               - ./Thingworx.war:/usr/local/tomcat/webapps/Thingworx.war

            environment:

               - "JAVA_OPTS=-Dserver -Dd64 -Xms1024m -Xmx5g -XX:+UseNUMA -XX:+UseConcMarkSweepGC"

         

        You do need to specify you want to use Java 8 runtime.

         

        Not sure I needed the JAVA_OPTS but I saw them used in another forum thread.

         

        You create folders in the directory where the yaml file is for the two ThingWorx storage folders. You also copy the thingworx.war file from the developer zip.

         

        You expose the 8080 port from the container to localhost.

         

        Run this with:

         

        docker-compose up

         

        Wait about a minute and then ThingWorx is up and running.

         

        This is so easy that the developer release docs should recommend this as the easy-button.

         

        Interested to hear if this works for anyone else.

         

        Jim

          • Re: Can the developer freemium edition of ThingWorx be run inside of docker?
            jlyon-2 Newbie

            I would agree that docker is a great approach for testing, teaching, and learning ThingWorx. You can spin up a test ThingWorx instance in a matter of seconds (literally) with a quick `docker run` command and can even spin up PostgreSQL, MySQL, etc to pair with ThingWorx for testing various scenarios.

             

            We use docker build files instead and then push the image to a private repository for other people in our organization to use. For them, it's a one-line command to run a new ThingWorx instance.