Creating a docker template


Nem

Recommended Posts

Are there any tutorials for creating a docker template for unraid?

 

Theres an image for mongodb on docker hub (https://hub.docker.com/r/tutum/mongodb/) that I really want to run as a container on my unraid server, but I haven't see it in any of the template repos. How easy would it be to create my own template for it so I can install it on my unraid server?

Turn on dockerHub searches within CA and search for it then add it.  If CA doesn't pick up the /data/db and the port, the merely add it yourself.  done

 

(Or alternatively, hit Add Container within the docker tab and manually enter in all the relevant information.  done)

Link to comment

So I am interested in doing just this. I found an image on docker hub. I got CA to convert it. I am now adding container, but I am wondering about what to use for environment variables?

 

The image I found has a sample docker-compose.yml that has a bunch of variables. I'm assuming I should use some/all of these?

 

#docker-compose.yml
sync-engine:
  image: nhurel/nylas-sync-engine
  ports:
    - 5555:5555
  links:
    - mysql:mysql
    - redis:redis
  hostname: sync-engine
  log_opt:
    max-size: "10m"
    max-file: "10"

mysql:
  image: mysql
  environment:
    - MYSQL_ROOT_PASSWORD=root
  volumes:
    - nylas_mysql:/var/lib/mysql
  log_opt:
    max-size: "10m"
    max-file: "10"

redis:
  image: redis
  volumes:
    - nylas_redis:/data
  log_opt:
    max-size: "10m"
    max-file: "10"

Link to comment
  • 9 months later...

Right, I'm aware of that. I just wanted to know if that was a necessity. I I imagine it would be safer to set one up than not to.

 

Sent from my SAMSUNG-SM-G900A using Tapatalk

 

As long as it runs as 99:100 it'll work fine on unraid but will cause issues on other platforms.

Link to comment

Right, I'm aware of that. I just wanted to know if that was a necessity. I I imagine it would be safer to set one up than not to.

 

Sent from my SAMSUNG-SM-G900A using Tapatalk

 

As long as it runs as 99:100 it'll work fine on unraid but will cause issues on other platforms.

I guess a better question to ask would be what's different about running containers on unraid vs standard docker?

 

Sent from my SAMSUNG-SM-G900A using Tapatalk

 

 

Link to comment

Nothing, each Linux machine will have certain UIDs and GIDs that you may want the container to use.  In Unraid they are 99:100.  So you can hardcode that in and the container will run fine on Unraid and the appdata will have the correct permissions to enable editing, or you can make it configurable and people can adjust it to whatever suits them and what distro they're using.

Link to comment

Nothing, each Linux machine will have certain UIDs and GIDs that you may want the container to use.  In Unraid they are 99:100.  So you can hardcode that in and the container will run fine on Unraid and the appdata will have the correct permissions to enable editing, or you can make it configurable and people can adjust it to whatever suits them and what distro they're using.

 

So how do I go about doing that?  Is there an easy example I can follow?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.