If you using Dockerfile
, you should know about caching for faster builds.
Sometimes, you need to rebuild without cache. you can run docker build
with
--no-cache
option that will disable all layer cache.
There is problem when you should use some Dockerfile
commands like ADD
or
COPY
to copy file form host to container.
Introduction to Apache Cassandra
Cassandra has a peer-to-peer distributed architecture that is much more elegant, and easy to set up and maintain. In Cassandra, all nodes are the same; there is no concept of a master node, with all nodes communicating with each other via a gossip protocol.
There is nothing programmatic that a developer or administrator needs to do or code to distribute data across a cluster. Data is transparently partitioned across all nodes in either a randomized or ordered fashion, with random being the default.
When creating a new Cassandra database (also called a keyspace), a user simply indicates via a single command which data centers and/or cloud providers will hold copies of the new database; everything from that point forward is automatically handled and maintained by Cassandra.
If one or more nodes responsible for a particular set of data are down, data is simply written to another node, which temporarily holds the data. Once the node(s) come back online, they automatically bring themselves back up to date from nodes that are holding the data they maintain.
A user requests data from any node (which becomes that user’s coordinator node ), with the user’s query being assembled from one or more nodes holding the necessary data. If a particular node having the required data is down, Cassandra simply requests data from another node holding a replicated copy of that data.
While Cassandra is not a transactional database in the same way that legacy RDBMSs offer ACID transactions, it does offer the “AID” portion of ACID, in that data written is atomic, isolated, and durable. The “C” of ACID does not apply to Cassandra, as there is no concept of referential integrity or foreign keys
Because NoSQL databases like Cassandra do not support operations like SQL joins, data tends to be highly denormalized. While such a thing (wide rows) is normally a problem for an RDBMS, Cassandra provides exceptional performance for objects with many thousands of columns.
You can start crontab
following Run a cron job with Docker
just put crontab
in /etc/cron.d/
and run cron
for making it working.
Reduce Docker image size can help your to portable your contain across network, save bandwidth and storage, faster to scale.
It is minimal Docker image based on Alpine Linux that only 5 MB.
You can install packages with apk add --update <pakckages>
and
you can check packages that avaible on alpine packages.
You can see how small alpine based image are. However alpine based is new born linux that not contain much packages as older linux like debian/ubuntu. There are some compiled packages and some that your have to compile with your own.