# Automate Import project using docker compose

**URL:** <https://forum.inductiveautomation.com/t/automate-import-project-using-docker-compose/85005>\
**Category:** Ignition\
**Tags:** docker, ignition81, perspective\
**Created:** [January 31, 2024, 9:39am UTC](https://forum.inductiveautomation.com/t/automate-import-project-using-docker-compose/85005 "2024-01-31T09:39:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_Ali](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Ali\_Ali](https://forum.inductiveautomation.com/u/Ali_Ali)\
**Post date:** [January 31, 2024, 9:39am UTC](https://forum.inductiveautomation.com/t/automate-import-project-using-docker-compose/85005/1 "2024-01-31T09:39:11Z")

</div>

Hello everyone, I have an issue that might be silly or I missing something. I can't automate importing projects with docker compose.

```auto
services:
  edge:
    image: inductiveautomation/ignition:latest
    ports:
      - 9050:8088
    volumes:
      - edge-data:/usr/local/bin/ignition/data
      - ./gw-init/backup.gwbk:/backup.gwbk
    networks:
      edge:
        aliases:
          - edge-server
    environment:
      - IGNITION_EDITION=edge
      - GATEWAY_ADMIN_PASSWORD=password
      - ACCEPT_IGNITION_EULA=Y
    command: >
      -n Edge
      -r /backup.gwbk

  trans:
    image: inductiveautomation/ignition:latest
    ports:
      - 9051:8088
    volumes:
      - trans-data:/usr/local/bin/ignition/data
      - ./gw-init/Trans:/usr/local/bin/ignition/data/projects/Trans
    networks:
      edge:
        aliases:
          - trans-server
    environment:
      - IGNITION_EDITION=standard
      - GATEWAY_ADMIN_PASSWORD=password
      - ACCEPT_IGNITION_EULA=Y
    command:
      -n TranslationManager
volumes:
  edge-data:
  trans-data:
networks:
  edge:

```

My docker-compose looks like that, but the trans container fail to start and I have this errors in logs:

```auto
jvm 1 | 2024/01/31 09:24:07 | E [c.i.i.g.p.ProjectFileTree] [09:24:07]: Unable to create resource dir: /usr/local/bin/ignition/data/projects/.resources
jvm 1 | 2024/01/31 09:24:07 | E [c.i.i.g.p.ProjectFileTree] [09:24:07]: Error creating digest for resourceManifest=/usr/local/bin/ignition/data/projects/Trans/com.inductiveautomation.perspective/views/TranslationsManager/EmbView/Key/resource.json, file=thumbnail.png
jvm 1 | 2024/01/31 09:24:07 | java.nio.file.NoSuchFileException: /usr/local/bin/ignition/data/projects/.resources/9190b2661556b3c4c485f975e7184ce6243b04dbaa7224013d37632aabec0841

```

Thanks for the help

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [February 1, 2024, 4:16pm UTC](https://forum.inductiveautomation.com/t/automate-import-project-using-docker-compose/85005/2 "2024-02-01T16:16:36Z")

</div>

There is an unfortunate behavior w/ bind-mounts where preceding folders that need to be created get created with `root` ownership. The easiest way to proceed is to leverage our root step-down functionality to launch the container as root, adjust filesystem permissions as needed, and then launch the gateway as the target user.

Add a `user: "0:0"` to your service alongside additional env vars `IGNITION_UID` and `IGNITION_GID` (you might need to match these to your user ID if you're running Docker Engine on Linux directly, otherwise, leave them at the default `2003` to match our container image default `ignition` user).

Try the following adjustment to your `trans` service:

```yaml
# ...
  trans:
    image: inductiveautomation/ignition:latest
    ports:
      - 9051:8088
    volumes:
      - trans-data:/usr/local/bin/ignition/data
      - ./gw-init/Trans:/usr/local/bin/ignition/data/projects/Trans
    networks:
      edge:
        aliases:
          - trans-server
    user: 0:0
    environment:
      - IGNITION_EDITION=standard
      - GATEWAY_ADMIN_PASSWORD=password
      - ACCEPT_IGNITION_EULA=Y
      - IGNITION_UID=2003
      - IGNITION_GID=2003
    command:
      -n TranslationManager

```
