• / company
    • about us
      • / about us

        The partner of choice for data & product engineering to drive business growth & deliver an impact within your organization
    • product engineering
      • / product engineering
        We specialize in Software Product Engineering, transforming your concepts into impactful products.
    • technology
      • / technology
        250+ specialists skilled in software, BI, integration, offering end-to-end services from research to ongoing maintenance.
    • methodology
      • / methodology
        We specialize in software product engineering, transforming your concepts into impactful products.
    • careers
      • / careers
        Our team needs one more awesome person, like you. Let’s grow together! Why not give it a try?
    • do good
      • / do good
        We’re a team devoted to making the world better with small acts. We get involved and always stand for kindness.
    • events
      • / events
        LLMs in Action: Transforming How We Work, Communicate, and Innovate
    • blog
      • / blog
        Why Every Developer Should Care About AI Plugins, And What You Might Be Missing
        mindit chats with Andreea Moldovan: “At mindit.io people really put effort into making it happen.”
    • contact us
      • / contact us
        We would love to hear from you! We have offices and teams in Romania and Switzerland. How can we make your business thrive?
  • / get in touch

Docker Containers – mindit.io’s Kubernetes 101 Blog Series

If you’re new to our Kubernetes 101 series, you can start by reading the first blog post, right here.
‍Intro

The usual way of developing an application is writing code locally, then deploying that code on a server.

Any differences between environments (permissions, database access, etc.) may lead to errors.

With containers, we can create a portable unit that contains all of the dependencies needed for it to run in any environment whether it’s local, development, testing, or production.

Microservices architecture for application development evolved out of this container development.

With containers, applications could be broken down into their smallest components, which could be developed and deployed independently instead of one monolithic unit.
Dockerfile

Now, moving forward to the nitty-gritty part of it.

Docker containers are created based on a Dockerfile.

A Dockerfile is a simple text file that contains a list of commands that the Docker client calls when creating an image.
Dockerfile basic commands

* FROM – specify base image

* COPY – copy files to the container

* RUN – install needed dependencies

* EXPOSE – the port number to be exposed

* CMD – the command to be run when the container starts

* ENTRYPOINT – the command to be run when the container starts

( CMD is used when a default command that can be easily overriden is needed, whereas ENTRYPOINT cannot be overriding )
Example:

FROM adoptopenjdk/openjdk11:alpine-jre // The base for the image – Alpine Linux

COPY /build/libs/application-0.1.jar application-0.1.jar // Copy the jar into the image

ENTRYPOINT [“java”,”-jar”,”application-0.1.jar”]. // The executable to start when the container is booting.

To create the container you need to run:

docker build . –tag=new-app // Creates the Docker image and adds it to the registry

docker run new-app // Creates and starts a container based on the Docker image
Follow the Kubernetes 101 series on mindit.io.

Check out new-spike.net for other articles on Kubernetes and much more!

Distribute:

/turn your vision into reality

The best way to start a long-term collaboration is with a Pilot project. Let’s talk.