Skip to content
Snippets Groups Projects
Commit b428a536 authored by Виталий Шунков's avatar Виталий Шунков
Browse files

refactor: change user name and homedir in docker image

parent e861afa1
No related branches found
No related tags found
1 merge request!1337refactor: change user name and homedir in docker image
Pipeline #52425 failed
...@@ -23,16 +23,17 @@ RUN cargo build --locked --release --features webui ...@@ -23,16 +23,17 @@ RUN cargo build --locked --release --features webui
FROM rockylinux:8 FROM rockylinux:8
COPY --from=builder /build/picodata/target/release/picodata /usr/bin/picodata COPY --from=builder /build/picodata/target/release/picodata /usr/bin/picodata
COPY helm/entrypoint.sh /home/picouser/entrypoint.sh COPY helm/entrypoint.sh /entrypoint.sh
RUN chmod 755 /usr/bin/picodata \ RUN chmod 755 /usr/bin/picodata \
&& chmod 755 /home/picouser/entrypoint.sh \ && mkdir -p /var/lib/picodata && mkdir -p /var/run/picodata \
&& groupadd -g 1000 picouser \ && chmod 755 /entrypoint.sh \
&& useradd -u 1000 -g 1000 picouser \ && groupadd -g 1000 picodata \
&& chown 1000:1000 -R /home/picouser && useradd -u 1000 -g 1000 picodata -s /usr/sbin/nologin \
&& chown 1000:1000 -R /var/lib/picodata
USER 1000:1000 USER 1000:1000
WORKDIR /home/picouser WORKDIR /var/lib/picodata
ENTRYPOINT ["/home/picouser/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment