Answer the question
In order to leave comments, you need to log in
How to compile inside OC?
Conditionally, I need to: Build a centos image and install some packages in it, the option with one Dockerfile is not suitable.
I read a bunch of articles on how easy it is to build an image, but without specifically specifying the OS. I do not like it.
Here is an elementary example from some site:
version: '3.3'
services:
db:
image: mysql:5.7
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
wordpress:
image: wordpress
restart: always
volumes:
- ./wp_data:/var/www/html
ports:
- "8080:80"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: root
WORDPRESS_DB_PASSWORD: password
depends_on:
- db
volumes:
db_data:
wp_data:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question