Created
March 13, 2015 18:09
-
-
Save yupadhyay/fac0cb0778bd5ded7833 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#First make sure that you can connect to docker registry | |
curl -u admin:admin https://<your docker registry host> | |
#If this works make sure that you can ping images in registry | |
curl -u admin:admin https://<your docker registry host>/v1/_ping | |
#If this works login in to docker registry server (admin:admin) | |
docker login https://<your docker registry host> | |
#if this works then download docker images | |
docker pull <your docker registry host>/wemblog/aem_microsite:5.6 | |
# After download is done start your docker image using following command | |
# You can also a docker image using 'docker run -d -t -i -p 4502:4502 <Image ID>' | |
# To get image ID you can use command 'docker images' | |
docker run -d -t -i -p 4502:4502 -p 4503:4503 -p 8080:80 -p 8443:443 <your docker registry host>/wemblog/aem_microsite:5.6 | |
# This command will start author on 4502, publish on 4503 and apache on 8080 and 8443. If port 80 and 443 of your local is not busy then start apache on 80 and 443 by changing port | |
# THIS MIGHT TAKE SOME TIME (Some case 15 Minute) to start | |
# This will start a docker image in background (-d) on port 4502 and expose port 4502 | |
# Server might take some time to start | |
# Make sure that docker is running using command | |
docker ps | |
# You should see something like this for your image | |
#CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS | |
#e1d870f39bda wemblog/aem_microsite:5.6 "/usr/bin/supervisor 7 minutes ago Up 7 minutes 0.0.0.0:4502->4502/tcp, #0.0.0.0:4503->4503/tcp, 0.0.0.0:8090-#>80/tcp, 0.0.0.0:8443->443/tcp <some name> | |
# Now you can access your author using http://locahost:4502, publish using http://locahost:4503, apache using http://locahost:8090 &https://locahost:8443 | |
# If you can not access this on Mac then run "boot2docker ip" and then use output IP and then port to access. | |
# In your mac you can also run $ echo "$(boot2docker ip) localhost" | sudo tee -a /etc/hosts | |
# To check log use following command | |
docker logs -f <Container ID> | |
# Once you see http://localhost:4503/ Quickstart started | |
# This mean that CQ is started in container | |
# If this does not return any thing that means your docker instance did not come up | |
# With docker ID from above command run following | |
docker exec -it <Docker id> bash | |
# This will take you to VM environment and from there you can go /export/apps/aem/<author or publish or httpd> to check log for either author or publish or apache | |
# You can also change your configuration there and start and stop your instances | |
# Note that after making some changes if you start your instance using initial docker run command, your changes might be overriden. | |
# If you want to keep your changes. Commit your changes after change. For more info look in to docker commit command | |
# to exit from container just type exit. this will not stop container. You can also check it with docker ps | |
#You can also run following to check status of your container. If it is using right location | |
docker inspect <Container ID> | |
# To stop your docker container you can use | |
# IMPORTANT: Please commit your docker image before you do any change. When you stop and start your docker image new VM will be started | |
docker commit --message="<What did you do>" <Container ID> <your docker registry host>/wemblog/aem_microsite:5.6 | |
docker stop <Container ID> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment