How to install docker on AlmaLinux 8
To install docker on AlmaLinux, run the following commands Install yum-utils Add docker repository Install Docker CE with Enable docker Start Docker To verify if docker is working properly, run Example See docker
To install docker on AlmaLinux, run the following commands Install yum-utils Add docker repository Install Docker CE with Enable docker Start Docker To verify if docker is working properly, run Example See docker
When running docker on a server with CSF firewall, you may face network connection error because iptables rules added by docker getting replaced by CSF firewall. If your docker installation is exposing service to localhost, which is skipped by CSF firewall by default, you can do the following, which will skip the docker0 interface also, … Read more
Oracle Linux Server 8 does not include docker in the official repository, it provides Podman as an alternative to docker. We can install the Docker Community Edition on Oracle Linux Server 8.x from the Docker repository. Enable Docker repository dnf install -y dnf-utils dnf config-manager –add-repo=https://download.docker.com/linux/centos/docker-ce.repo Install Docker Community Edition with command dnf install -y … Read more
RHEL replaced Docker on RHEL 8 (CentOS 8) with podman. To install Docker on CentOS, you can do the fallowing steps. Install yum-utils yum install -y yum-utils Add Docker repository yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo Install Docker with yum install docker-ce docker-ce-cli containerd.io Enable docker to start on boot systemctl enable docker Start docker systemctl start docker … Read more
If you have a docker image and don’t have the Dockerfile used to create the image, dfimage can help you re-create Dockerfile. To find information about an image, you can use the command “docker history IMAGE_ID”. History command will show all actions taken on the image, including the commands used. You can use this information … Read more
To create a docker container with Apache, create a Dockerfile mkdir my-app cd my-app vi Dockerfile Paste following content into the Dockerfile from ubuntu:20.04 ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y apache2 RUN echo ‘Hello World!’ > /var/www/html/index.html RUN echo ‘. /etc/apache2/envvars’ > /root/run_apache.sh && \ echo ‘mkdir -p /var/run/apache2’ >> /root/run_apache.sh && … Read more
Odoo is an open source ERP and CRM software written in python. To install Odoo using docker, first install docker using wget -qO- https://get.docker.com/ | sh Odoo use PostgreSQL server to store database. Lets create a postgres docker container. docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=your-password-here -e POSTGRES_DB=postgres –name odoo-db postgres:10 In above command, replace … Read more
On a docker image, when i run ps, i get error root@2efea503e8b7:~# ps bash: ps: command not found root@2efea503e8b7:~# To install ps on Debian/Ubuntu, run apt -y install procps
When you run a docker image, it create a container and run it. After docker container stop, container stays, so you can use it again if required. Some times, you need to delete docker container after it is run. This is useful if your docker container is just a command line executable. In my case, … Read more
To run PostgreSQL on docker, create a directory for saving the data presistant mkdir -p /opt/my-postgresql run docker container docker run –name my-postgresql \ -p 5432:5432 \ -e POSTGRES_PASSWORD=serverok123 \ -e POSTGRES_USER=serverok \ -e POSTGRES_DB=serverok \ -v /opt/my-postgresql:/var/lib/postgresql/data \ -d postgres In above, change the value for POSTGRES_DB, POSTGRES_USER and POSTGRES_PASSWORD as needed. Connect to … Read more
I have a docker container, that i need to start on server boot. The docker-compose.yml file i used to create this docker container is [root@cp03 serverok-rubycms]# cat docker-compose.yml version: ‘3’ services: web: image: serverok/rubycms:1.0 command: bash -c “rm -f tmp/pids/server.pid && cd /myapp && source /etc/profile.d/rvm.sh && script/server -e production” volumes: – /home/naiwnyc/cms:/myapp ports: – … Read more
When running docker-compose on CentOS 7, i get following error [root@cp03 serverok-rubycms]# docker-compose up docker-compose: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted [root@cp03 serverok-rubycms]# To fix the error, do the following mv /usr/local/bin/docker-compose /usr/local/bin/docker-compose-bin Now create a new file vi /usr/local/bin/docker-compose Add following content #!/bin/bash export … Read more