I have my dockerfile that contains a base image and a composer to install and I need to create a makefile for installing the existing dockerfile and I have no idea how can I create it
Asked
Active
Viewed 838 times
0
-
1Containerfiles cannot be "*installed*". Do you mean "build a container-image from the containerfile"? – Turing85 Apr 26 '22 at 17:51
-
1yes I need to build my image from dockerfile using makefile, when I launch make install I need dockerfile to be built – Sella Apr 26 '22 at 18:03
1 Answers
0
You can start with a basic Makefile such as:
IMAGENAME=my-image
.PHONY: build all
.DEFAULT_GOAL := all
build:
@docker build -t ${IMAGENAME} .
all: build
Read this article for more information, and to understand what .PHONY
means read this answer.

Ortomala Lokni
- 56,620
- 24
- 188
- 240