ganglia
作者:互联网
docker-compose.yaml
version: '3'
services:
server:
image: ganglia-server:latest
container_name: ganglia-server
hostname: gs
# volumes:
ports:
- "20004:80"
networks:
ganglia_net:
ipv4_address: 172.30.10.1
client-01:
image: ubuntu:20.04
container_name: ganglia-client-01
hostname: gc-1
command:
- tail
- -f
- /var/log/faillog
networks:
ganglia_net:
ipv4_address: 172.30.10.2
# volumes:
# ports:
client-02:
image: ubuntu:20.04
container_name: ganglia-client-02
hostname: gc-2
command:
- tail
- -f
- /var/log/faillog
networks:
ganglia_net:
ipv4_address: 172.30.10.3
# volumes:
# ports:
client-03:
image: ubuntu:20.04
container_name: ganglia-client-03
hostname: gc-3
command:
- tail
- -f
- /var/log/faillog
networks:
ganglia_net:
ipv4_address: 172.30.10.4
# volumes:
# ports:
networks:
ganglia_net:
ipam:
driver: default
config:
- subnet: 172.30.10.0/24
ip_range: 172.30.10.0/24
gateway: 172.30.10.254
Dockerfile
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update;apt-get install vim wget ssh nginx apache2 \
ganglia-monitor rrdtool gmetad ganglia-webfrontend -y
RUN cp /etc/ganglia-webfrontend/apache.conf /etc/apache2/sites-enabled/ganglia.conf
RUN mkdir -p /run/sshd
WORKDIR /~
# ENTRYPOINT [ "/usr/sbin/sshd", "-D" ]
CMD [ "/usr/sbin/sshd", "-D" ]
标签:image,networks,client,ganglia,172.30,net 来源: https://www.cnblogs.com/fengfengyang/p/16551370.html