How to install or update VIMP Corporate Enterprise via the Docker image?

Editions: Corporate Enterprise
Versions: 4.3+

Download and import image

Download the Docker image tarball from your personal account and import it like described below.

If you want to install VIMP via Docker image for the first time, please contact us to provide the image in your account.

PLEASE NOTE: The following installation instructions are not intended for production use! Please consult your system administrator to set up VIMP in a production Docker environment!

Initial installation

Please replace 4.x.x-rxxxxx in the following with the actual version number and revision.

gunzip vimp-corporate-enterprise-docker-4.x.x-rxxxxx.tar.gz
docker load -i vimp-corporate-enterprise-docker-4.x.x-rxxxxx.tar

First, we determine the repository and correct tag for our VIMP image:

docker images | grep vimp

You will get a list of the existing Docker images by the above command. Only the latest VIMP image is relevant for us now, which appears in the list as follows, for example:

REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
registry.vimp.com/vimp/enterprise   4.3.3-16            62fbad7db208        18 hours ago        1.93GB

The registry path and tag must be replaced accordingly in the following commands and in the docker-compose.yml file, so make a note of both (in our example, it would be composed registry.vimp.com/vimp/enterprise:4.3.3-16).

We now proceed to create the directory from which the volumes will be mounted (please replace test-vimp with the actual directory name you want to use):

mkdir -p test-vimp
cd test-vimp

As well as with the directory for the MySQL data:

mkdir -p vimp4_db

Now we copy the contents of the config, templates and userdata directories (replace the registry path and tag here accordingly).

docker run -d --name tmp_vimp_enterprise registry.vimp.com/vimp/enterprise:4.3.3-16 \
&& docker cp tmp_vimp_enterprise:/var/www/html/config . \
&& docker cp tmp_vimp_enterprise:/var/www/html/templates . \
&& docker cp tmp_vimp_enterprise:/var/www/html/userdata . \
&& docker stop tmp_vimp_enterprise \
&& docker rm tmp_vimp_enterprise

Let’s see, if config, templates and userdata are there:

ls

Make sure you have a proper docker-compose.yml file in the current directory next to the config, templates, and userdata folders (see the end of this article for an example of the docker-compose.yml).

Then execute the following:

docker-compose up -d

You can check with docker-compose logs -f if the database is ready to accept connections. Then install the VIMP application and create all required tables like follows.

When prompted, please ensure that the database credentials match the database credentials of the docker-compose.yml file.

Please note to enter the name of the service as database host, in this case "db".

docker-compose exec httpd ./symfony framework:install -C --yes \
&& docker-compose exec httpd ./symfony framework:update --nothing --modules=yes \
&& docker-compose exec httpd ./symfony framework:update --nothing --database=yes \
&& docker-compose exec httpd ./symfony framework:update --nothing --rebuild=yes

IMPORTANT NOTE: framework:install will delete all existing data! Do not execute this on an existing VIMP database unless you know what you are doing! See next, how to update the Docker image.

That’s it – you can now access VIMP via your given Apache server name, which in our example is http://localhost.

Update new Docker image

Here we describe how to update VIMP Corporate Enterprise with docker-compose when a new version of the image exists.

Please replace 4.x.x-rxxxxx in the following with the actual version number and revision.

gunzip vimp-corporate-enterprise-docker-4.x.x-rxxxxx.tar.gz
docker load -i vimp-corporate-enterprise-docker-4.x.x-rxxxxx.tar

First, we again determine the repository and correct tag for our VIMP image:

docker images | grep vimp

You will get a list of the existing Docker images by the above command. Only the latest VIMP image is relevant for us now, which appears in the list as follows, for example:

REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
registry.vimp.com/vimp/enterprise   4.3.3-16            62fbad7db208        18 hours ago        1.93GB

The registry path and tag must be replaced accordingly in the following commands and in the docker-compose.yml file, so make a note of both (in our example, it would be composed registry.vimp.com/vimp/enterprise:4.3.3-16).

In the following, please replace the directory test-vimp again with the actual directory name you want to use and replace the registry path as described above:

cd test-vimp \
&& mkdir tmp \
&& docker run -d --name tmp_vimp_enterprise registry.vimp.com/vimp/enterprise:4.3.3-16 \
&& docker cp tmp_vimp_enterprise:/var/www/html/config ./tmp/config \
&& docker cp tmp_vimp_enterprise:/var/www/html/templates ./tmp/templates \
&& docker cp tmp_vimp_enterprise:/var/www/html/userdata ./tmp/userdata \
&& docker stop tmp_vimp_enterprise \
&& docker rm tmp_vimp_enterprise \
&& rm ./tmp/config/databases.yml ./tmp/config/propel.ini

With the above commands you have created a "tmp/" directory and copied the config, templates and userdata folders into it from the current VIMP version.

Next, some manual work is required. Your customizations in the previous folders (if you made any) must be merged with the files from /tmp/{config,userdata,templates}.

In the simplest case - if you have not made any individual adjustments - you can simply copy the files:

cp -ar tmp/* .

When this is done, you can stop and remove the current VIMP version with:

docker-compose stop httpd && docker-compose rm httpd

And start the new version with:

docker-compose up -d httpd

But before that, please adjust the correct version in docker-compose.yml.

The last thing to do is to run a database update:

docker-compose exec httpd ./symfony framework:update --nothing --plugins=yes --database=yes

And the file permissions for the volumes will be set again with:

docker-compose exec httpd ./symfony framework:permissions

Sample docker-compose.yml

Please replace the registry path as described above!

version: '3.3'
services:
  httpd:
    image: registry.vimp.com/vimp/enterprise:4.3.3-16
    container_name: vimp_httpd
    restart: always
    ports:
      - "80:80"
    environment:
      - APACHE_SERVER_NAME=localhost
    volumes:
      - ./config:/var/www/html/config:cached
      - ./templates:/var/www/html/templates:cached
      - ./userdata:/var/www/html/userdata
    links:
      - db
    depends_on:
      - db

  db:
    image: mariadb:latest
    container_name: vimp_db
    #command: mysqld --sql_mode="" --character-set-server=utf8 --init-connect='SET NAMES UTF8;'
    command: mysqld --sql_mode="IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO"
    restart: always
    expose:
      - 3306
    volumes:
      - "./vimp4_db:/var/lib/mysql"
    environment:
      MYSQL_USER: vimp
      MYSQL_PASSWORD: secret
      MYSQL_ROOT_PASSWORD: secret
      MYSQL_DATABASE: vimp

Last update on 2022/05/20 by Admin.

Go back