Deploy a Docker App
Docker is the application delivery mechanism of choice for a growing number of applications. Miget provides native support for running containerized applications and services at scale, offering capabilities previously only available in complex orchestration tools such as Kubernetes.
Prepare the App
Clone a local version of the Miget's dockerfile hello world sample application that you can then deploy to Miget. Run these commands in your local terminal:
$ git clone https://github.com/migetapp/dockerfile-hello-world.git
$ cd dockerfile-hello-world
Deploy the App
Info
A demo instance of this app is hosted at dockerfile.onmiget.com.
Create an App
To prepare Miget to receive your source code, you need to create an app on Miget.
On app.miget.com, click the New button and select Application to create a new app.
In the Create new App window, add the App Name.
Note
If you choose a name like example, your app will get an additional "-" and five different characters (e.g., example-1jgiq). This makes sure the name is unique.
Select the resource where you want your app to be deployed. Resource is your compute power where your app will run. Resources are available in different plans and can be bought in different regions. You can get a new resource or assign an existing one. Resource is your Kubernetes namespace (your Miget Resource) where your app will run.
Click Next.
Select the builder type and the size of your app. Builder is your build environment where your app will be built. Size is your compute power where your app will run.
If you don't want to use a predefined size, you can specify a custom size and CPU cap. Leave the defaults if you want to keep Fair Scheduler enabled.
Click Next.
Select the deploy method. Deploy method is your deployment method where your app will run.
Note
Currently only git push deploy method is supported.
Click Create.
On success, you will be redirected to an app overview screen.
Assign Compute Power
Every app you make needs compute power. Your app space (default ingress, build context, etc.) is being created in the background.
Deploy using Git
Get Miget Git Token
Navigate to Deploy via git button, and click it. Next, you will see an Information box with a deploy commands.
Click See the token button and grab your token.
Info
- The default username for the HTTPS-based git repo is your Miget name.
- The password is the token.
- If you revoke the default token associated with your Miget name, you won't be able to deploy.
- If you add a new Git token, the token name is the Username for Git, and the token itself is the Password.
Deploy Your App
Add remote repository to your git repo. In our case, navigate to previously cloned repository and add remote.
$ cd node-js-hello-world
$ git remote add miget https://git.<region>.miget.io/<your-miget-name>/<app-name>
<region> with a region code of your Miget, <your-miget-name> with your compute name, and <app-name> with your application name.
Push to Miget Git
$ git push miget
Enumerating objects: 10, done.
Counting objects: 100% (10/10), done.
Delta compression using up to 16 threads
Compressing objects: 100% (8/8), done.
Writing objects: 100% (10/10), 146.66 KiB | 16.29 MiB/s, done.
Total 10 (delta 0), reused 0 (delta 0), pack-reused 0
-----> Set main as deploy-branch
remote: ! no entries found in Procfile
-----> Cleaning up...
-----> Building example-1jgiq from Dockerfile
remote: #0 building with "default" instance using docker driver
remote:
remote: #1 [internal] load build definition from Dockerfile
remote: #1 transferring dockerfile: 372B done
remote: #1 DONE 0.0s
remote:
remote: #2 [internal] load metadata for docker.io/nginxinc/nginx-unprivileged:latest
remote: #2 DONE 0.9s
remote:
remote: #3 [internal] load .dockerignore
remote: #3 transferring context: 2B done
remote: #3 DONE 0.0saIS1N2zHT4Yf0RpnxSOY3O50ivOn63dS
remote:
remote: #4 [1/3] FROM docker.io/nginxinc/nginx-unprivileged:latest@sha256:78e0a42a309fd21299b3618fdcd20d1adddb43531a3a4483df858b867a58e546
remote: #4 DONE 0.0s
remote:
remote: #5 [internal] load build context
remote: #5 transferring context: 251.51kB done
remote: #5 DONE 0.0s
remote:
remote: #6 [2/3] COPY nginx-config/default.conf /etc/nginx/conf.d/default.conf
remote: #6 CACHED
remote:
remote: #7 [3/3] COPY src /usr/share/nginx/html
remote: #7 DONE 0.0s
remote:
remote: #8 exporting to image
remote: #8 exporting layers 0.0s done
remote: #8 writing image sha256:6886e78227460c72eff42e821b7e69d56b19e603c7ae5b7f922d1b0918fe4ca7 done
remote: #8 naming to docker.io/miget/example-1jgiq:latest done
remote: #8 DONE 0.0s
-----> Releasing example-1jgiq...
-----> Checking for predeploy task
No predeploy task found, skipping
-----> Checking for release task
No release task found, skipping
-----> Checking for first deploy postdeploy task
No first deploy postdeploy task found, skipping
-----> Pushing image to registry
Bumping tag to 1
Retrieving image info for app
Tagging migetyem/example-1jgiq:1 in registry format
Tagging migetyem/example-1jgiq as latest in registry format
Pushing registry.eu-east-1.miget.io/migetyem/example-1jgiq:latest
The push refers to repository [registry.eu-east-1.miget.io/migetyem/example-1jgiq]
cc273630eed0: Preparing
a9da55574fa3: Preparing
bc963a16518c: Preparing
c3eaf25cce1f: Preparing
e8e8b90ef69e: Preparing
1652d286cd81: Preparing
77aa34154d21: Preparing
1652d286cd81: Waiting
0cd352d74817: Preparing
77aa34154d21: Waiting
b63704acfa08: Preparing
0cd352d74817: Waiting
b63704acfa08: Waiting
e0781bc8667f: Preparing
e0781bc8667f: Waiting
bc963a16518c: Mounted from migetyem/dev-docs-nxvts
a9da55574fa3: Mounted from migetyem/dev-docs-nxvts
c3eaf25cce1f: Mounted from migetyem/dev-docs-nxvts
e8e8b90ef69e: Mounted from migetyem/dev-docs-nxvts
cc273630eed0: Pushed
1652d286cd81: Mounted from migetyem/dev-docs-nxvts
77aa34154d21: Mounted from migetyem/dev-docs-nxvts
0cd352d74817: Mounted from migetyem/dev-docs-nxvts
b63704acfa08: Mounted from migetyem/dev-docs-nxvts
e0781bc8667f: Mounted from migetyem/dev-docs-nxvts
latest: digest: sha256:82697d323ace8c03ab37683e00800960414b94a2bddc2d98206e2bb9cb141fe5 size: 2404
Pushing registry.eu-east-1.miget.io/migetyem/example-1jgiq:1
The push refers to repository [registry.eu-east-1.miget.io/migetyem/example-1jgiq]
cc273630eed0: Preparing
a9da55574fa3: Preparing
bc963a16518c: Preparing
c3eaf25cce1f: Preparing
e8e8b90ef69e: Preparing
1652d286cd81: Preparing
77aa34154d21: Preparing
1652d286cd81: Waiting
77aa34154d21: Waiting
0cd352d74817: Preparing
b63704acfa08: Preparing
e0781bc8667f: Preparing
0cd352d74817: Waiting
b63704acfa08: Waiting
e0781bc8667f: Waiting
c3eaf25cce1f: Layer already exists
a9da55574fa3: Layer already exists
e8e8b90ef69e: Layer already exists
cc273630eed0: Layer already exists
bc963a16518c: Layer already exists
e0781bc8667f: Layer already exists
0cd352d74817: Layer already exists
1652d286cd81: Layer already exists
77aa34154d21: Layer already exists
b63704acfa08: Layer already exists
1: digest: sha256:82697d323ace8c03ab37683e00800960414b94a2bddc2d98206e2bb9cb141fe5 size: 2404
Cleaning up
Image registry.eu-east-1.miget.io/migetyem/example-1jgiq:1 pushed
Untagging extra tag latest
-----> Deploying example-1jgiq via the kubernetes scheduler...
=====> Deploying via kubernetes
-----> Deploying web to 1
deployment.apps/example-1jgiq-web created
# deploy/example-1jgiq-web added
# deploy/example-1jgiq-web rs/example-1jgiq-web-5dd59486d6 added
# deploy/example-1jgiq-web po/example-1jgiq-web-5dd59486d6-vdlb8 added
# deploy/example-1jgiq-web event: po/example-1jgiq-web-5dd59486d6-vdlb8 Pulling: Pulling image "registry.eu-east-1.miget.io/migetyem/example-1jgiq:1"
# deploy/example-1jgiq-web event: po/example-1jgiq-web-5dd59486d6-vdlb8 Pulled: Successfully pulled image "registry.eu-east-1.miget.io/migetyem/example-1jgiq:1" in 742ms (742ms including waiting)
# deploy/example-1jgiq-web event: po/example-1jgiq-web-5dd59486d6-vdlb8 Created: Created container example-1jgiq-web
# deploy/example-1jgiq-web event: po/example-1jgiq-web-5dd59486d6-vdlb8 Started: Started container example-1jgiq-web
# deploy/example-1jgiq-web become READY
service/example-1jgiq-web configured
=====> Deploy complete
-----> Running post-deploy
-----> Checking for postdeploy task
No postdeploy task found, skipping
=====> Application deployed:
http://example-1jgiq.eu-east-1.migetapp.com
To https://git.eu-east-1.miget.io/migetyem/example-1jgiq
* [new branch] main -> main
Visit the app at the URL generated by its app name.





