# Tutorial: Run a test Docker image

**URL:** <https://community.gladysassistant.com/t/tutoriel-lancer-une-image-docker-de-test/8042>\
**Category:** Tutoriels\
**Created:** [March 24, 2023, 8:56am UTC](https://community.gladysassistant.com/t/tutoriel-lancer-une-image-docker-de-test/8042 "2023-03-24T08:56:58Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [March 24, 2023, 8:56am UTC](https://community.gladysassistant.com/t/tutoriel-lancer-une-image-docker-de-test/8042/1 "2023-03-24T08:56:58Z")

</div>

Sometimes a developer wants to offer a “test” Docker image on the forum to allow users to test a new integration before it is deployed to production.

Unlike the “official” Docker image, which is hosted on the project account `gladysassistant/gladys`, a test image will be hosted on the developer’s Docker account. Example: `jeanfrancois/gladys`.

To run a test Docker image, it’s the same process as described on the Gladys installation page via Docker: [Docker | Gladys Assistant](https://gladysassistant.com/fr/docs/installation/docker).

The only difference is that you need to change the image name in the docker run to the test image, and modify some parameters of the command.

**Before you begin**

⚠ ⚠ If you don’t know what you’re doing, avoid running your test image on the same machine as your production installation, as this could have consequences for your installation! ⚠⚠

**Launching the test image**

Let’s imagine we want to run a test image of the “zwave” integration, developed by “jeanfrancois”.

We’ll take the `docker run` command from the Gladys site, and modify several things:

- The container name, for example «&nbsp;gladys-zwave-test&nbsp;» instead of «&nbsp;gladys&nbsp;»: `--name gladys-zwave-test \\`
- The port on which Gladys runs, for example 8001 instead of 80: `-e SERVER_PORT=8001 \\`
- The folder where all Gladys files will be stored (database, configuration): `-v /var/lib/gladysassistant_zwave_test:/var/lib/gladysassistant \\`
- The name of the Docker image to run: `jeanfrancois/gladys` instead of `gladysassistant/gladys`

Which gives us this command :

```auto
docker run -d \
--log-driver json-file \
--log-opt max-size=10m \
--cgroupns=host \
--restart=always \
--privileged \
--network=host \
--name gladys-zwave-test \
-e NODE_ENV=production \
-e SERVER_PORT=8001 \
-e TZ=Europe/Paris \
-e SQLITE_FILE_PATH=/var/lib/gladysassistant/gladys-production.db \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/gladysassistant_zwave_test:/var/lib/gladysassistant \
-v /dev:/dev \
-v /run/udev:/run/udev:ro \
jeanfrancois/gladys

```

**To access Gladys:**

```auto
http://IP_MACHINE:8001

```

**To stop this container:**

```auto
docker stop gladys-zwave-test

```

**To remove this container:**

```auto
docker rm gladys-zwave-test

```

**To fetch a new version of the image**

(if the dev has progressed on their integration):

```auto
docker pull jeanfrancois/gladys

```

Note that a Docker container is immutable: if you pull a new image, you must stop the container, remove the container, then docker run a new container 🙂

**Note:**

Avoid connecting your Gladys Plus account to a test instance, as this will disconnect your production instance.

---

_[View the full topic](https://community.gladysassistant.com/t/tutoriel-lancer-une-image-docker-de-test/8042)._
