Git functions (Designer Save) from Ignition Docker container

EDIT: Never mind. I ended up having to add a SWITCH user command to switch to root in order for it to work.

I’m trying to build the dockerfile and I’m getting permission denied errors.

=> ERROR [2/2] RUN apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends         git &&             rm -rf /var/lib/apt/lists/*                                                                                                                  0.2s

[2/2] RUN apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends         git &&             rm -rf /var/lib/apt/lists/*:
0.207 Reading package lists...
0.215 E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)




Dockerfile:3

2 |     FROM inductiveautomation/ignition:${IGNITION_VERSION}
3 | >>> RUN apt-get update && 
4 | >>>     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends 
5 | >>>         git && 
6 | >>>             rm -rf /var/lib/apt/lists/*

ERROR: failed to build: failed to solve: process "/bin/sh -c apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends         git &&             rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

Here’s my dockerfile:

ARG IGNITION_VERSION="8.3"

FROM inductiveautomation/ignition:${IGNITION_VERSION}

RUN apt-get update && \

    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \

        git && \

            rm -rf /var/lib/apt/lists/*

Sounds like you got it resolved already, but yes, you can switch to root and do your system-level image manipulations and then return to the built-in ignition user afterwards, e.g.

ARG IGNITION_VERSION="8.3.2"
FROM inductiveautomation/ignition:${IGNITION_VERSION}

# Conduct system-level changes as root user
USER root
RUN apt-get update && ...

# Return to ignition user
USER ignition