Turn Your Vehicle Into a Smart Earning Asset

While you’re not driving your car or bike, it can still be working for you. MOTOSHARE helps you earn passive income by connecting your vehicle with trusted renters in your city.

🚗 You set the rental price
🔐 Secure bookings with verified renters
📍 Track your vehicle with GPS integration
💰 Start earning within 48 hours

Join as a Partner Today

It’s simple, safe, and rewarding. Your vehicle. Your rules. Your earnings.

Docker Tutorials: Image – Create a image using Dockerfile

We learnt docker so we can create better docker images using dockerfile?

What is dockerfile?

- a file
- contains instructions
- for writing each layer
- multiple layers == one image

Rule of dockerfile?

  • each line ==== one layer
  • Each layer would be created from a container from the previous layer

Example of Dockerfile


FROM ubuntu
MAINTAINER Rajesh Kumar <rajesh@devopsschool.com?
RUN apt-get update
RUN apt-get install git -y
COPY index.html /optCode language: JavaScript (javascript)

FROM ubuntu
MAINTAINER Rajesh Kumar <rajesh@devopsschool.com?
RUN apt-get update
RUN apt-get install git -y
COPY index.html /optCode language: JavaScript (javascript)

FROM httpd
MAINTAINER Rajesh Kumar <rajesh@devopsschool.com?
RUN apt-get update
RUN apt-get install git -y
COPY index.html /optCode language: JavaScript (javascript)

   15  mkdir dock-image
   16  cd dock-image/
   17  clear
   18  vi dockerfile
   19  touch index.html
   20  docker build -t ub-up-git .
   21  docker images

Lab & Excercise

- https://devopsschool.com/tutorial/docker/dockerfile/dockerfile-example-sample-lab.html

Example of App Dockerfile
# https://github.com/jenkinsci/docker/blob/587b2856cd225bb152c4abeeaaa24934c75aa460/Dockerfile
# https://github.com/tianon/docker-brew-ubuntu-core/blob/50b110c15148c069706b155a60d21ecfcbb59de9/focal/Dockerfile
# https://github.com/docker-library/httpd/blob/6d68525ac47c0474d3d74269b2669104c1d867dd/2.4/Dockerfile

How to set PID1 for the image?
- CMD or ENTRYPOINT

Reference 
- https://devopsschool.com/tutorial/docker/commands/index.html
- $ docker help
Code language: PHP (php)

Reference

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x