Config dir ownership mismatch error on windows 1809 container for elasticsearch

Due to some restrictions at my company we are not allowed to use linux based containers. I am therefore creating a windows container based ELK stack. My dockerfile is heavily inspired by diamol/Dockerfile at master · sixeyed/diamol · GitHub

FROM as download
USER ContainerAdministrator
RUN curl -o
RUN tar -xzf

# elasticsearch
FROM openjdk:11-jdk-nanoserver-1809

EXPOSE 9200 9300
ENV ES_HOME="/usr/share/elasticsearch" \
    ES_JAVA_OPTS="-Xms1024m -Xmx1024m"

WORKDIR /usr/share/elasticsearch
COPY --from=download /elasticsearch-${ELASTIC_VERSION}/ .
COPY elasticsearch.yml config/

USER ContainerAdministrator
CMD ["bin\\elasticsearch.bat"]

I have a very simple elasticsearch.yml "windowsrocks"
discovery.type: single-node

When I start the built image it does not give me a password for Kibana. It instead gives me the error:
Aborting auto configuration because of config dir ownership mismatch. Config dir is owned by BUILTIN\Administrators but auto-configuration directory would be owned by User Manager\ContainerAdministrator

I'm a bit stumped as to what I need to do to get this working. The original file is for 6.8.5 and I've been able to get it to work on 7.6.2 but I'd like to update it to the latest version (8.4.3 as of this writing).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.