1

When one searches for make on dockerhub multiple images are returned, but none of them seems to be able to run make.

030
  • 13,383
  • 17
  • 76
  • 178

3 Answers3

5

GNU make can be found in the gcc container.

Compile your app inside the Docker container There may be occasions where it is not appropriate to run your app inside a container. To compile, but not run your app inside the Docker instance, you can write something like:

$ docker run --rm -v "$PWD":/usr/src/myapp -w /usr/src/myapp gcc:4.9 gcc -o myapp myapp.c

This will add your current directory, as a volume, to the container, set the working directory to the volume, and run the command gcc -o myapp myapp.c. This tells gcc to compile the code in myapp.c and output the executable to myapp. Alternatively, if you have a Makefile, you can instead run the make command inside your container

AWippler
  • 166
  • 1
1

Depending on what language you want to build with, you can try some of these containers:

  • Python: lambci/lambda:build-python3.6
  • Nodejs: amaysim/serverless:1.23.0
  • Golang: amaysim/golang:1.8.3
user2640621
  • 1,405
  • 9
  • 20
-1

In my opinion there shouldn't be an image to run make, because if you want to build something from source you should install the dependencies and configure before run make, so I think it is just a command and you don't need an image to install it, even make is not a service to be in separate image, it must be used in Dockerfile to help you building your service from source during the image build time and not create a specific image for it.

Wissam Roujoulah
  • 422
  • 1
  • 3
  • 8