skip to Main Content

Dockerfile RUN layers vs script

Docker version 19.03.12, build 48a66213fe So in a dockerfile, if I have the following lines: RUN yum install aaa bbb ccc && <some cmd> && <etc> && <some cleanup> is that a best practice? Should I keep yum part separate…

VIEW QUESTION

Docker doesn't create database

I have Dockerfile: FROM postgres ENV POSTGRES_USER root ENV POSTGRES_PASSWORD root ENV POSTGRES_DB world COPY world.sql /docker-entrypoint-initdb.d/ I run docker build -t postgres, then I create container but it doesn't create database in PG. Does anyone have any idea? world.sql…

VIEW QUESTION

How to build a Docker image?

I have a directory named docker which contains the following two files: docker: |_Dockerfile |_main.py The Dockerfile looks like this: #Specifying the base image FROM python:3.10 #here the dockerfile is pulling the python 3.10 from docker hub which already has…

VIEW QUESTION
Back To Top
Search