Skip to content

Instantly share code, notes, and snippets.

# via REST api
http://<registry-host>/v1/search?<image-name>
# example
http://10.2.4.201/v1/search?rabbitmq
# via REST api
http://<registry-host>/v1/repositories/<image-name>/tags
# example
http://10.2.4.201/v1/repositories/rabbitmq/tags
# issue DELETE request with curl from command line
curl -X DELETE "http://<registry-host>/v1/repositories/<image-name>/"
# example
curl -X DELETE "http://10.2.4.201/v1/repositories/rabbitmq/"
# issue DELETE request with curl from command line
curl -X DELETE "http://<registry-host>/v1/repositories/<image-name>/tags/<tag-name>"
# example
curl -X DELETE "http://10.2.4.201/v1/repositories/rabbitmq/tags/0.7"
@erangaeb
erangaeb / uninstall_docker
Created November 17, 2016 12:01
uninstall docker
# uninstall
sudo apt-get remove docker.io
sudo apt-get autoremove docker.io
sudo apt-get purge docker.io
sudo apt-get purge --auto-remove docker.io
sudo apt-get autoclean
# remove configs
sudo rm -rf /var/lib/docker/
sudo rm /etc/apparmor.d/docker
@erangaeb
erangaeb / dockerfile_django
Created February 13, 2017 09:21
docker file to dockerize django application
FROM ubuntu
MAINTAINER Eranga Bandara ([email protected])
# Update apt-get sources AND install required packages
RUN apt-get update -y
RUN apt-get install -y apt-transport-https
RUN apt-get install -y build-essential
RUN apt-get install -y python python-pip python-dev python-setuptools
RUN apt-get install -y libmysqlclient-dev
@erangaeb
erangaeb / docker_entrypoint
Last active February 13, 2017 09:42
docker entrypoint for django app
#!/bin/bash
# apply database migrations
# didn't use 'south' in order to keep things simple
# with south db migaration would be like below
# python manage.py migrate tastypi
# python manage.py migrate south
# python manage.py migrate api
#
#
@erangaeb
erangaeb / dockerfile_nginx
Created June 23, 2017 04:56
docker file for nginx
FROM ubuntu:14.04
MAINTAINER Eranga Bandara ([email protected])
# install nginx
RUN apt-get update -y
RUN apt-get install -y python-software-properties
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:nginx/stable
RUN apt-get update -y
@erangaeb
erangaeb / nginx.conf
Created June 23, 2017 05:04
nginx config file
server {
listen 80;
server_name bankz.com www.bankz.com;
location / {
proxy_pass http://web:3000/;
}
}
@erangaeb
erangaeb / docker-compose
Last active March 14, 2018 08:32
docker compose nginx
web:
image: erangaeb/senzweb:0.10
container_name: web
ports:
- 3000:3000
nginx:
image: erangaeb/senznginx:0.4
container_name: nginx