env vars: size, label; volumes as hdds

This commit is contained in:
Karol Majek
2018-11-29 14:41:08 +01:00
parent adc3330076
commit f56ab1a6e0
18 changed files with 208 additions and 322 deletions

View File

@@ -1,17 +1,20 @@
FROM ubuntu:14.04
FROM debian:stretch
# Install wget, lsb-release and curl
RUN apt-get update && apt-get install -y wget lsb-release curl
RUN apt-get update && apt-get upgrade -y && apt-get install -y wget lsb-release curl net-tools gnupg2 systemd python
# Add key
RUN wget -O - http://ppa.moosefs.com/moosefs.key | apt-key add -
RUN . /etc/lsb-release && echo "deb http://ppa.moosefs.com/moosefs-3/apt/ubuntu/$DISTRIB_CODENAME $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/moosefs.list
RUN echo "deb http://ppa.moosefs.com/moosefs-3/apt/$(awk -F= '$1=="ID" { print $2 ;}' /etc/os-release)/$(lsb_release -sc) $(lsb_release -sc) main" > /etc/apt/sources.list.d/moosefs.list
# Install MooseFS master and CGI
RUN apt-get update && apt-get install -y moosefs-master moosefs-cgi moosefs-cgiserv
#Enable CGI Serv
ADD moosefs-cgiserv /etc/default/moosefs-cgiserv
#Enable CGI server autostart
RUN systemctl enable moosefs-cgiserv
#Enable master server autostart
RUN systemctl enable moosefs-master
# Expose ports
EXPOSE 9420 9421 9422 9423 9424 9425

View File

@@ -1,12 +0,0 @@
# /etc/default/moosefs-cgiserv
# Start mfscgiserv from init.d script on boot.
# Only allowed values are "true" and "false".
# Undefined values default to "false".
MFSCGISERV_ENABLE=true
# user and group used to run mfscgiserv
MFSCGISERV_USER=nobody
MFSCGISERV_GROUP=nogroup
DAEMON_OPTS=""

View File

@@ -8,7 +8,7 @@ echo " mfsmaster" >> /etc/hosts
ifconfig eth0 | awk '/inet addr/{print substr($2,6)}'
mfsmaster start -a
service moosefs-cgiserv start
mfscgiserv
if [[ $1 == "-d" ]]; then
while true; do sleep 1000; done