Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Is there any way to build cloudron apps without publishing the app to docker hub?

Is there any way to build cloudron apps without publishing the app to docker hub?

Scheduled Pinned Locked Moved App Packaging & Development
11 Posts 4 Posters 1.9k Views 4 Watching
  • 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.
  • ChristopherMagC Offline
    ChristopherMagC Offline
    ChristopherMag
    wrote on last edited by
    #2

    Earlier in the packaging tutorial it has steps to login to cloudron via the cli using cloudron login my.example.com but it doesn't have a sept to login to docker before trying to run docker build.

    At least one missing step I think that is needed to help get towards a solution is doing a docker login to the private docker registry hosted on cloudron by doing the following:

    docker login https://dockerregistry.cloudron.ourdomain.com
    

    and then login with your cloudron credentials.

    1 Reply Last reply
    0
    • ChristopherMagC Offline
      ChristopherMagC Offline
      ChristopherMag
      wrote on last edited by
      #3

      To fix the docker build command drop the https:// off of the tag name which turns it into:

      docker build -t dockerregistry.cloudron.ourdomain.com/cloudronusername/appname:v1 .
      

      From this it seems like docker using the format of a tag name to defined the remote repository where a image should be pushed to, I feel like that isn't right as that seems like a bad idea.

      Now when doing docker push change it to:

      docker push dockerregistry.cloudron.ourdomain.com/cloudronusername/appname:v1
      

      This isn't using the cloudron build server but at least this seems to work to get the image pushed to the cloudron hosted docker registry.

      1 Reply Last reply
      0
      • timconsidineT Offline
        timconsidineT Offline
        timconsidine
        App Dev
        wrote on last edited by
        #4
        This post is deleted!
        1 Reply Last reply
        0
        • timconsidineT Offline
          timconsidineT Offline
          timconsidine
          App Dev
          wrote on last edited by
          #5

          I'm not understanding the problem.
          Certainly no https needed in the docker build statement
          The docker push goes to your own private registry

          1 Reply Last reply
          0
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by girish
            #6

            To answer the original question atleast: Is there any way to build cloudron apps without publishing the app to docker hub? Yes, definitely.

            Also, the "build service" is really just an exotic "docker build && docker push" done on the server side (instead of building and pushing from your laptop). You might ask why this is needed. This was mostly done because we work a lot out of coffee shops and libraries. Docker images, being large in size, usually cannot be pushed in public wifi. So, instead what we do is: upload just the package source code to the server and the server does the docker build and push.

            This also means that if you have good internet access, you can just skip this build service stuff altogether.

            The steps to create your app with a private registry are:

            • docker build -t myregistry/myapp:1.0.0 .
            • docker push myregistry/myapp:1.0.0 - you might have to docker login etc for this to work.
            • Images can be private or public. For example, all our appstore docker images are public, so it needs no authentication. If your images are private, you have to configure Cloudron with registry credentials - https://docs.cloudron.io/settings/#private-docker-registry
            • cloudron install --image myregistry/myapp:1.0.0
            1 Reply Last reply
            3
            • ChristopherMagC Offline
              ChristopherMagC Offline
              ChristopherMag
              wrote on last edited by
              #7

              @girish I believe your instructions still result in the image that was built being pushed to docker hub.

              Regardless of whether the image is marked private or public in docker hub, for compliance reasons we cannot use docker hub as a cloud service, private or public.

              girishG 1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by nebulon
                #8

                @ChristopherMag that is correct, it will be pushed by default to the docker hub. If using a private docker image registry, then you have to use this feature https://docs.cloudron.io/settings/#private-docker-registry

                1 Reply Last reply
                2
                • ChristopherMagC ChristopherMag

                  @girish I believe your instructions still result in the image that was built being pushed to docker hub.

                  Regardless of whether the image is marked private or public in docker hub, for compliance reasons we cannot use docker hub as a cloud service, private or public.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by girish
                  #9

                  @ChristopherMag said in Is there any way to build cloudron apps without publishing the app to docker hub?:

                  @girish I believe your instructions still result in the image that was built being pushed to docker hub.

                  Not really, the format I used in the examples is <registry>/repo:tag . registry can be your registry. only if registry is missing, it will attempt docker hub.

                  @nebulon

                  @ChristopherMag that is correct, it will be pushed by default to the docker hub.

                  But I used myregistry in my examples. Wondering if I am missing something.

                  (note repository != registry)

                  ChristopherMagC 1 Reply Last reply
                  0
                  • girishG girish

                    @ChristopherMag said in Is there any way to build cloudron apps without publishing the app to docker hub?:

                    @girish I believe your instructions still result in the image that was built being pushed to docker hub.

                    Not really, the format I used in the examples is <registry>/repo:tag . registry can be your registry. only if registry is missing, it will attempt docker hub.

                    @nebulon

                    @ChristopherMag that is correct, it will be pushed by default to the docker hub.

                    But I used myregistry in my examples. Wondering if I am missing something.

                    (note repository != registry)

                    ChristopherMagC Offline
                    ChristopherMagC Offline
                    ChristopherMag
                    wrote on last edited by
                    #10

                    @girish Your completely right, I didn't catch the wording and I was wrong.

                    I don't know of a way to have a registry on cloudron that isn't a domain, not just a host, so what makes more sense to me is seeing it has

                    docker build -t myregistry.cloudron.somedomain.com/myapp:1.0.0 .
                    

                    Unless there is a way to alias a single hostname like myregistry to a more complete domain name.

                    I haven't tested this but maybe docker will by default use the dns suffix learned from DHCP or manually configured as the suffix to myregistry so if you happen have cloudron hosting apps on the domain that matches your computers dns suffix then maybe you could specify myregistry and the rest would be properly inferred.

                    girishG 1 Reply Last reply
                    0
                    • ChristopherMagC ChristopherMag

                      @girish Your completely right, I didn't catch the wording and I was wrong.

                      I don't know of a way to have a registry on cloudron that isn't a domain, not just a host, so what makes more sense to me is seeing it has

                      docker build -t myregistry.cloudron.somedomain.com/myapp:1.0.0 .
                      

                      Unless there is a way to alias a single hostname like myregistry to a more complete domain name.

                      I haven't tested this but maybe docker will by default use the dns suffix learned from DHCP or manually configured as the suffix to myregistry so if you happen have cloudron hosting apps on the domain that matches your computers dns suffix then maybe you could specify myregistry and the rest would be properly inferred.

                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #11

                      @ChristopherMag good point 😄 I will remember to use user.myregistry.com or something like that next time!

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search