Skip to content

Instantly share code, notes, and snippets.

@JimiC
Created July 10, 2019 13:20
Show Gist options
  • Save JimiC/2b7d03b41b46d6d327d30bc97e30e324 to your computer and use it in GitHub Desktop.
Save JimiC/2b7d03b41b46d6d327d30bc97e30e324 to your computer and use it in GitHub Desktop.
FROM ubuntu:bionic

EXPOSE 2224

ARG HACLUSTER_PASS

RUN apt-get update \
    ; apt-get -y install systemd tzdata \
    ; ln -fs /usr/share/zoneinfo/Europe/Athens /etc/localtime && dpkg-reconfigure -f noninteractive tzdata \
    ; apt-get -y install pcs fence-agents resource-agents \
    ; apt-get -y autoclean

RUN (echo ${HACLUSTER_PASS}; echo ${HACLUSTER_PASS}) | passwd hacluster

CMD ["/lib/systemd/systemd", "--system"]

The above creates a base docker container of the Pacemaker Cluster Manager on Ubunt::Bionic.

Note: Change Europe/Athens according to your timezone.

Build

docker build --rm --build-arg 'HACLUSTER_PASS=<YourSecurePAssword>' -f 'pathTo/Dockefile' -t pcs:latest .

Run

docker run -d --rm --privileged --name pcs --net host -p 2224:2224 pcs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment