# Docker Container Start Issue with APOC Plugin

**URL:** https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715
**Category:** Docker
**Tags:** apoc
**Created:** [March 8, 2024, 9:31am UTC](https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715 "2024-03-08T09:31:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dharmil26shah](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dharmil26shah/32/31044_2.png) [@dharmil26shah](https://community.neo4j.com/u/dharmil26shah)
#### Post date: [March 8, 2024, 9:31am UTC](https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715/1 "2024-03-08T09:31:52Z")

</div>

Hi there,

I'm currently facing an issue while trying to start a Docker container with the APOC plugin by following the instructions outlined in the Neo4j documentation: [Installation - APOC Documentation](https://neo4j.com/docs/apoc/current/installation/#docker).

The provided command is intended to run Neo4j 5.17.0 in a Docker container with the latest version of the APOC Library:

```auto
docker run -p 7474:7474 -p 7687:7687 --name neo4j-apoc -e NEO4J_apoc_export_file_enabled=true -e NEO4J_apoc_import_file_enabled=true -e NEO4J_apoc_import_file_use __neo4j__ config=true -e NEO4J_PLUGINS=\[\"apoc\"\] neo4j:5.17.0

```

However, I encounter the following error message:

```auto
parse error: Invalid numeric literal at line 1, column 2
parse error: Invalid numeric literal at line 1, column 2

```

I would appreciate your assistance in resolving this issue. Please let me know if you need any additional information.

---

<div class="post-metadata">

### Author: ![jenny.owen](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jenny.owen/32/3229_2.png) [@jenny.owen](https://community.neo4j.com/u/jenny.owen)
#### Post date: [March 8, 2024, 10:44am UTC](https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715/2 "2024-03-08T10:44:21Z")

</div>

Your docker run worked when I tried it. What is the output if you add `-e NEO4J_DEBUG=true` ?

Another option is that whatever shell you're using doesn't like the escaping around the `NEO4J_PLUGINS` env. What happens if you try `-e NEO4J_PLUGINS='["apoc"]'` instead?

---

<div class="post-metadata">

### Author: ![dharmil26shah](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/dharmil26shah/32/31044_2.png) [@dharmil26shah](https://community.neo4j.com/u/dharmil26shah)
#### Post date: [March 8, 2024, 11:10am UTC](https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715/3 "2024-03-08T11:10:13Z")

</div>

Hi,

Thanks for the response. I have tried with and without escaping around the NEO4J\_PLUGIN. I am getting the same error.

> Blockquotedocker run --rm -p 7474:7474 -p 7687:7687 --name neo4j-apoc -e NEO4J\_apoc\_export\_file\_enabled=true -e NEO4J\_apoc\_import\_file\_enabled=true -e NEO4J\_apoc\_import\_file\_use\_\_neo4j\_\_config=true -e NEO4J\_DEBUG=true -e NEO4J\_PLUGINS='["apoc"]' neo4j:5.17.0  
> DEBUGGING ENABLED  
> Running as root user inside neo4j image  
> chowning /var/lib/neo4j recursively to neo4j:neo4j  
> Setting all files in /var/lib/neo4j/conf to permissions 600  
> checking /logs is writable  
> checking /data is writable  
> checking /data/databases is writable  
> checking /data/transactions is writable  
> One or more NEO4J\_PLUGINS have been requested.  
> Checking requested plugins are known and can be installed.  
> parse error: Invalid numeric literal at line 1, column 2  
> parse error: Invalid numeric literal at line 1, column 2  
> Setting docker specific configuration overrides  
> Appended server.memory.pagecache.size=512M to /var/lib/neo4j/conf/neo4j.conf  
> Appended server.default\_listen\_address=0.0.0.0 to /var/lib/neo4j/conf/neo4j.conf  
> Applying configuration settings that have been set using environment variables.  
> Removing existing setting for server.directories.logs in /var/lib/neo4j/conf/neo4j.conf  
> Appended server.directories.logs=/logs to /var/lib/neo4j/conf/neo4j.conf  
> Appended apoc.import.file.use\_neo4j\_config=true to /var/lib/neo4j/conf/apoc.conf  
> Appended apoc.import.file.enabled=true to /var/lib/neo4j/conf/apoc.conf  
> Appended apoc.export.file.enabled=true to /var/lib/neo4j/conf/apoc.conf  
> Setting initial password from environment  
> getting full neo4j run command  
> exec su-exec neo4j:neo4j /opt/java/openjdk/bin/java -cp /var/lib/neo4j/plugins/_:/var/lib/neo4j/conf/_:/var/lib/neo4j/lib/\* -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:+UnlockExperimentalVMOptions -XX:+TrustFinalNonStaticFields -XX:+DisableExplicitGC -Djdk.nio.maxCachedBufferSize=1024 -Dio.netty.tryReflectionSetAccessible=true -Djdk.tls.ephemeralDHKeySize=2048 -Djdk.tls.rejectClientInitiatedRenegotiation=true -XX:FlightRecorderOptions=stackdepth=256 -XX:+UnlockDiagnosticVMOptions -XX:+DebugNonSafepoints --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED -Dlog4j2.disable.jmx=true -Dfile.encoding=UTF-8 org.neo4j.server.CommunityEntryPoint --home-dir=/var/lib/neo4j --config-dir=/var/lib/neo4j/conf --console-mode  
> 2024-03-08 11:07:28.628+0000 INFO Logging config in use: File '/var/lib/neo4j/conf/user-logs.xml'  
> 2024-03-08 11:07:28.653+0000 INFO Starting...  
> 2024-03-08 11:07:29.418+0000 INFO This instance is ServerId{d62ab29b} (d62ab29b-7c83-4931-8206-6915edf46103)  
> 2024-03-08 11:07:29.966+0000 INFO ======== Neo4j 5.17.0 ========  
> 2024-03-08 11:07:32.482+0000 INFO Bolt enabled on 0.0.0.0:7687.  
> 2024-03-08 11:07:33.030+0000 INFO HTTP enabled on 0.0.0.0:7474.  
> 2024-03-08 11:07:33.030+0000 INFO Remote interface available at [http://localhost:7474/](http://localhost:7474/)  
> 2024-03-08 11:07:33.034+0000 INFO id: BB9D573D02B05035658E6AC1365C0C09139C52C69F1655E8779309447F82D7DF  
> 2024-03-08 11:07:33.034+0000 INFO name: system  
> 2024-03-08 11:07:33.035+0000 INFO creationDate: 2024-03-08T11:07:30.585Z  
> 2024-03-08 11:07:33.035+0000 INFO Started.

I have tried both windows CMD and powershell, could you please help me out?

---

<div class="post-metadata">

### Author: ![jenny.owen](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/jenny.owen/32/3229_2.png) [@jenny.owen](https://community.neo4j.com/u/jenny.owen)
#### Post date: [March 8, 2024, 2:56pm UTC](https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715/4 "2024-03-08T14:56:13Z")

</div>

It looks as though something is definitely going wrong when the image is trying to parse the `NEO4J_PLUGINS` string.

Inside the image, it parses `NEO4J_PLUGINS` using `jq` so `echo NEO4J_PLUGINS='["apoc"]' | jq` will reproduce the problem much quicker (although I don't know what the windows equivalent of that command would be).  
Since you're using windows I recommend also checking that the double quote `"` hasn't been replaced with some similar looking kind of double quote.

---

<div class="post-metadata">

### Author: ![arjan.vander.leden](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/arjan.vander.leden/32/31650_2.png) [@arjan.vander.leden](https://community.neo4j.com/u/arjan.vander.leden)
#### Post date: [May 5, 2024, 8:36am UTC](https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715/5 "2024-05-05T08:36:57Z")

</div>

for windows (Power Shell) the env variable should be specified as `NEO4J_PLUGINS=[\"apoc\"]`

---

<div class="post-metadata">

### Author: ![gert](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/gert/32/33176_2.png) [@gert](https://community.neo4j.com/u/gert)
#### Post date: [October 29, 2024, 9:08pm UTC](https://community.neo4j.com/t/docker-container-start-issue-with-apoc-plugin/66715/6 "2024-10-29T21:08:30Z")

</div>

I use docker compose (v2) on Linux and the notation of the env var turned out to be very sensitive.  
I had to endure this error message:  
neo4j-1 | parse error: Invalid numeric literal at line 1, column 2

This worked for me:

```
environment:
    - NEO4J_PLUGINS=["graph-data-science", "apoc", "genai"]

```

NOT:  
- NEO4J\_PLUGINS='["apoc"]'  
- NEO4J\_PLUGINS=\[\"apoc\"\]  
took me a while to figure this out ;-)

Maybe this helps others 🙂
