Skip to content

1. Setting up first service as container

Setting up Apache web server using Docker, and pulling an image from our GitLab registry, with Let's Encrypt SSL.

Original Author: Marko Rintamäki, Eino Puttonen, Provodin Grigory
Last updated by Jesse Anttila
Last checked by x
Version 0.2
Lastmod: 28.01.2026
Status: Needs testing
Comments: In Progress

Notes#

This guide is 100% NOT required, you will do similar steps in the next guide. Leaving it be until we give it a final verdict.

Create a NEW, CLEAN Rocky Linux virtual machine on cPouta for V1! Otherwise there might be conflicts!

In this quide we will setup simple apache server by applying Docker container technology

Introduction#

Introduction here

Prerequisites#

  • Rocky Linux 10 running on a CSC cPouta virtual machine
  • Ports 80 and 443 open

Docker setup#

  1. Initial updates and installs

    # Update repositories
    sudo dnf update -y
    sudo reboot
    

    Wait a moment and ssh back in.

    # Install prerequisites
    sudo dnf install epel-release dnf-utils -y
    sudo dnf install dnf-plugins-core -y
    sudo dnf install bind-utils -y
    nslookup <public ip of the virtual machine>
    
    Save your fip-aaa-bbb-ccc-ddd.kaj.poutavm.fi address somewhere.

  2. Add Docker repository and install Docker

    # Add Docker repo
    sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    
    # Install Docker and Compose plugin
    sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
    
    # Start Docker
    sudo systemctl enable --now docker
    
    # Test Docker
    sudo docker run hello-world
    
  3. Docker network and directories

    sudo docker network create apache-service
    
  4. Create a Docker compose file

We are going to use our favourite apache server container which is livin on gitlab repository: https://gitlab.labranet.jamk.fi/ref-product-line-v1-2025/apache-test

You should also be able to see latest docker container at : https://gitlab.labranet.jamk.fi/ref-product-line-v1-2025/apache-test/container_registry/926

```bash
mkdir apache-service
cd apache-service
sudo vi docker-compose.yml
```
  1. Start Containers
    sudo docker compose up -d
    sudo docker ps -a
    sudo docker logs -f letsencrypt
    

    After this, you should have a Let’s Encrypt certified PrestaShop running at fip-aaa-bbb-ccc-ddd.kaj.poutavm.fi.

Extra notes#

  • Ensure MySQL is ready before PrestaShop starts; consider retrying connections if needed.
  • Check folder permissions for ./ssl and ./html.
  • Verify DNS points correctly to the server for SSL to work.
  • If Docker reports irrelevant sections, check YAML indentation and Compose version.