Lately I stumbled across another runtime for JavaScript called Deno. Deno claims to be better than NodeJS in many regards (faster, more secure, easier), and has a much cooler website than NodeJS.
They also have a Docker Image available, so expect a size and resource comparison of NodeJS vs. Deno soon on my YouTube channel 😉
Those that have subscribed to my YouTube channel, might have noticed that the content has changed a bit away from Django, with more focus on Docker, Kubernetes, and Keptn.
With that in mind, I would like to share you my recent video series here:
In one of my recent videos I've disussed the size of the Django/Python Docker Containers and how to decrease it:
I failed to successfully create an image based on alpine, which is known to be very slim. With the help of Aaron Goodrich, who posted a comment with a Dockerfile for alpine, I was able to finally create such an image 🙂 Thanks for the help!
Without further ado, here are the results (and the respective Dockerfiles).
Please note that I have slightly changed the Dockerfile compared to the video above.
Based on Python 3.5 Jessie: 740 MB
FROM python:3.5-jessie
COPY ./app /app
WORKDIR /app
RUN pip install --no-cache-dir -r requirements/dev.txt
Based on Python 3.5 Slim: 188 MB
FROM python:3.5-slim
COPY ./app /app
WORKDIR /app
RUN pip install --no-cache-dir -r requirements/dev.txt
Based on Python 3.5 with Alpine: 248 MB
FROM python:3.5-alpine
COPY ./app /app
WORKDIR /app
RUN apk add --update --no-cache postgresql-client && \
apk add --update --no-cache --virtual .temp-build-deps gcc libc-dev linux-headers postgresql-dev
RUN pip install --no-cache-dir -r requirements/dev.txt
RUN apk del .temp-build-deps gcc libc-dev linux-headers postgresql-dev
This blog is using wordpress and certain tools of wordpress, that allow collecting statistical data, such as information about your web browser (Browser Name + Version). We do not share this information with any third party (such as Google Analytics), everything is kept within this wordpress blog and server.
Sometimes I just love how the open source community works nowadays! Sometimes you use your favourite search engine to find a package/repository/etc..., just to find out thatit contains a quickstart info, a proper package.json or docker-compose.yml. All you need to do is "npm install && npm run" or "docker-compose build && docker-compose up" and you are good to go.
This helps devs to contribute to open source software soooooo much!
TL;DR: Use Docker, package.json, requirements.txt, and for the love of god, write a Quickstart section into your Readme!
If you have ever gotten this error with your mod passenger installation:
$ passenger-config restart-app
*** ERROR: Phusion Passenger doesn't seem to be running. If you are sure that it
is running, then the causes of this problem could be one of:
1. You customized the instance registry directory using Apache's
PassengerInstanceRegistryDir option, Nginx's
passenger_instance_registry_dir option, or Phusion Passenger Standalone's
--instance-registry-dir command line argument. If so, please set the
environment variable PASSENGER_INSTANCE_REGISTRY_DIR to that directory
and run this command again.
2. The instance directory has been removed by an operating system background
service. Please set a different instance registry directory using Apache's
PassengerInstanceRegistryDir option, Nginx's passenger_instance_registry_dir
option, or Phusion Passenger Standalone's --instance-registry-dir command
line argument.
Then you most likely have SystemD running, which uses PrivateTmp folders instead of /tmp folders.