Last active
March 6, 2023 12:27
-
-
Save VLoub/08c7cdbbf93ff107f2ba08eb2aa32a77 to your computer and use it in GitHub Desktop.
Veeam Agent dockerized on Oracle Linux 8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM oraclelinux:8 | |
| # Configure systemd | |
| RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \ | |
| rm -f /lib/systemd/system/multi-user.target.wants/*;\ | |
| rm -f /etc/systemd/system/*.wants/*;\ | |
| rm -f /lib/systemd/system/local-fs.target.wants/*; \ | |
| rm -f /lib/systemd/system/sockets.target.wants/*udev*; \ | |
| rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \ | |
| rm -f /lib/systemd/system/basic.target.wants/*;\ | |
| rm -f /lib/systemd/system/anaconda.target.wants/*; | |
| # veeam dnf repo | |
| COPY veeam.repo /etc/yum.repos.d/veeam.repo | |
| # install all necessary SW | |
| RUN dnf update -y \ | |
| && dnf install -y \ | |
| oracle-epel-release-el8 initscripts gcc \ | |
| glibc-devel kernel-devel kernel-headers \ | |
| libcurl-devel libgcc libstdc++ make \ | |
| net-tools openssh-clients perl \ | |
| policycoreutils-python-utils rpm-build \ | |
| sudo tar unzip wget \ | |
| && dnf -y update | |
| # install veeam latest version | |
| RUN dnf -y install kmod-veeamsnap veeam \ | |
| && dnf -y autoremove && dnf clean all && rm -rf /var/cache/dnf/* | |
| # set folders (needs to be mounted to different system mounds (LVM)) | |
| VOLUME '/backup-source' | |
| VOLUME '/backup-target' | |
| # start system with systemd | |
| ENTRYPOINT ["/usr/lib/systemd/systemd"] | |
| # docker build . --tag veeam-agent-docker:$(date '+ol8-%y%m%d') | |
| # docker run -d --name veeam-agent --rm --tmpfs /tmp --tmpfs /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro -v $PWD/source:/backup-source -v /tmp/target:/backup-target veeam-agent-docker:$(date '+ol8-%y%m%d') | |
| # docker exec -it veeam-agent /bin/bash | |
| # veeam |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [veeam-repo] | |
| name=veeam-repo | |
| baseurl=https://repository.veeam.com/backup/linux/agent/rpm/el/8/$basearch | |
| enabled=1 | |
| gpgcheck=1 | |
| gpgkey=https://repository.veeam.com/backup/linux/agent/rpm/el/8/$basearch/repodata/repomd.xml.key | |
| repo_gpgcheck=1 | |
| sslverify=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment