background preloader


Facebook Twitter

Busybox-python Docker image. In my last post I demonstrated how to build a minimal Docker image for the cron-container.

busybox-python Docker image

All in all this approach works pretty well for the described use case. Following this road I wanted to use aws-cli for periodical AWS infrastructure updates. The aws command line tool is implemented in Python which needs to be installed inside the container. I found the python base images which provides the interpreter but comes with a massive overhead. The container became kind of huge for a simple script (the python:2-slim image has a size of approx. 200mb).

GitHub - progrium/busybox: Busybox container with glibc+opkg. GitHub - jimmidyson/docker-nginx-busybox. ‘Hello World’ with WSGI. I’ve been seeing a lot of talk about WSGI (Web Server Gateway Interface) and its benefits over the last six months or so and I’ve been meaning to take a look — not least because of the potential to use wsgi middleware to make a nice front-controller for KForge.

‘Hello World’ with WSGI

First Stop A quick google takes me to: I’m looking to just write the proverbial ‘hello world’ app at this stage. Most of the references are bit too high level (or complex) for me (though this one is an exception). So here I’m going to detail my experiences of familiarizing myself with wsgi by writing the classic ‘hello world’ app (if you looking to do something more sophisticated with wsgi check out a toolkit such as paste or pylons the framework built on top of paste). Hello World 1. Wsgiref is the wsgi reference implementation that is now part of python 2.5 standard library. . $ sudo easy_install wsgiref 2. 3. Start the server: $ python Then visit Bingo! 4. Serving static files with WSGI and Python 3. Two Factor Authentication with Flask - In this article I'm going to introduce an authentication scheme known as two factor authentication.

Two Factor Authentication with Flask -

As the name implies, this method requires the user to provide two forms of identification: a regular password and a one-time token. This greatly increases account security, because a compromised password alone is not enough to gain access, an attacker also needs to have the token, which is different every time. You can see me do a short demonstration of this technique in the video above. As usual, this article includes a complete example that implements this authentication technique in a Flask application. You may think this is going to be an advanced article that needs complex cryptographic techniques, specialized hardware and/or proprietary libraries, but in reality it requires none of the above.

The Example Application As mentioned above, in this article I present a complete example application. Try the example application now! Docker-nginx/Dockerfile at 8921999083def7ba43a06fabd5f80e4406651353 · nginxinc/docker-nginx. Docker-nginx/Dockerfile at 8921999083def7ba43a06fabd5f80e4406651353 · nginxinc/docker-nginx. Library/nginx - Docker Hub. For more information about this image and its history, please see the relevant manifest file (library/nginx).

library/nginx - Docker Hub

This image is updated via pull requests to the docker-library/official-images GitHub repo. For detailed information about the virtual/transfer sizes and individual layers of each of the above supported tags, please see the repos/nginx/ file in the docker-library/repo-info GitHub repo. Nginx (pronounced "engine-x") is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The nginx project started with a strong focus on high concurrency, high performance and low memory usage. It is licensed under the 2-clause BSD-like license and it runs on Linux, BSD variants, Mac OS X, Solaris, AIX, HP-UX, as well as on other *nix flavors. hosting some simple static content. Client API - docker-py Documentation. To instantiate a Client class that will allow you to communicate with a Docker daemon, simply do: >>> from docker import Client >>> cli = Client(base_url=' Params: base_url (str): Refers to the protocol+hostname+port where the Docker server is hosted.version (str): The version of the API the client will use.

Client API - docker-py Documentation

Specify 'auto' to use the API version provided by the server.timeout (int): The HTTP request timeout, in seconds.tls (bool or TLSConfig): Equivalent CLI options: docker --tls ...user_agent (str): Set a custom user agent for requests to the server. attach. Docker-machine direct install on Ubuntu with curl getting permission denied with sudo. Dghubble/python3 · Quay. How To Install and Use Docker on Ubuntu 16.04. Products: Python: eGenix PyRun - One file Python Runtime. eGenix PyRun™ combines a Python interpreter with an almost complete Python standard library into a single easy-to-use executable. Products: Python: eGenix PyRun - One file Python Runtime

Including Python 3.4 and 3.5 support ! Version: 2.2.3 Introduction eGenix PyRun™ is our open source, one file, no installation version of Python, making the distribution of a Python interpreter to run Python based scripts and applications to Unix based systems simple and efficient. Building a Python 3 REST application that scales “good enough” CLI Quickstart Guide Arukas with Python – Arukas. Putting Bottle in a Container: Docker and Bottle - Idol Star Astronomer. This is part 3 of a series of articles on Docker.

Putting Bottle in a Container: Docker and Bottle - Idol Star Astronomer

Please feel free to read part 1 and part 2. Install Docker and run hello-world - Docker. Step 1: Get Docker¶ Docker for Mac¶ Docker for Mac is our newest offering for the Mac.

Install Docker and run hello-world - Docker

It runs as a native Mac application and uses xhyve to virtualize the Docker Engine environment and Linux kernel-specific features for the Docker daemon. GitHub - blebo/docker-bottlebase: Creates a Docker container image for bottle, Python 3.4, virtualenv, uwsgi, nginx and Ubuntu 14.04. Docker-hub-images/Dockerfile at master · arukasio/docker-hub-images. Docker-bottlebase/Dockerfile at master · blebo/docker-bottlebase. GitHub - walkr/nanoservice: nanoservice is a small Python library for writing lightweight networked services using nanomsg. Python - Using the multiprocessing module for cluster computing. Sockets - interprocess communication in python. Creating super small docker images. Get Started with Docker Engine. Kubernetes - Hello World Walkthrough. Edit This Page Introduction The goal of this codelab is for you to turn a simple Hello World node.js app into a replicated application running on Kubernetes.

Kubernetes - Hello World Walkthrough

We will show you how to take code that you have developed on your machine, turn it into a Docker container image, and then run that image on Google Container Engine. Here’s a diagram of the various parts in play in this codelab to help you understand how pieces fit with one another. Use this as a reference as we progress through the codelab; it should all make sense by the time we get to the end. Introduction to Pika — pika 0.10.0 documentation. IO and Event Looping¶ As AMQP is a two-way RPC protocol where the client can send requests to the server and the server can send requests to a client, Pika implements or extends IO loops in each of its asynchronous connection adapters.

Introduction to Pika — pika 0.10.0 documentation

These IO loops are blocking methods which loop and listen for events. Each asynchronous adapters follows the same standard for invoking the IO loop. By Red Hat. How to Setup Microservices Architecture in Python with ZeroMQ & Docker. Microservices - What? Microservices are an architectural style in which multiple, independent processes communicate with each other. These processes are designed to be highly scalable, are de-coupled and perform one small task at a time. These multiple services have their own resources and processes which communicate among themselves through the network. This differs from a typical client-server architecture where the backend is one monolithic structure encapsulating all the server logic. Microservices - Full Stack Python. Microservices are an application architecture style where independent, self-contained programs with a single purpose each can communicate with each other over a network.

Typically, these microservices are able to be deployed independently because they have strong separation of responsibilities via a well-defined specification with significant backwards compatibility to avoid sudden dependency breakage. Microservices follow in a long trend of software architecture patterns that become all the rage. Previously, CORBA and (mostly XML-based) service-oriented architectures (SOA) were the hip buzzword among ivory tower architects. However, microservices have more substance because they are typically based on RESTful APIs that are far easier for actual software developers to use compared with the previous complicated XML-based schemas thrown around by enterprise software companies. Microservice resources. Exploring Python Microservices and Docker  - Coders Behaving Badly. Painless Docker 1.0 under Ubuntu 14.04 LTS - Idol Star Astronomer.

Hot on the heels of yesterday's post, I am going to address the one disappointment of that post. It installs an old version of docker! Let's celebrate Docker 1.0 by using Docker 1.0! Really Painless on AWS I have produced a new Cloudformation template:docker_server2.cfn.json which brings up an EC2 instance with the latest version of Docker (1.0 at the time of this writing). You can follow the instructions in my previous post to use this new template. If you want to install the latest Docker on Ubuntu manually, follow the directions below. Adding a New Repository In order to use the latest version of docker, while keeping the ease and simplicity of the Advanced Packaging Tool (APT), we need to add a new repository to our ubuntu. Putting Bottle in a Container: Docker and Bottle - Idol Star Astronomer.