Skip to content
Snippets Groups Projects
Commit cbfffc86 authored by Andri Joos's avatar Andri Joos :blush:
Browse files

add flutter user

parent 1ad036c8
No related merge requests found
...@@ -26,6 +26,9 @@ RUN wget "$GLIBC_URL/glibc-2.35-r1.apk" --directory-prefix $TMP_DEPENDENCIES_DIR ...@@ -26,6 +26,9 @@ RUN wget "$GLIBC_URL/glibc-2.35-r1.apk" --directory-prefix $TMP_DEPENDENCIES_DIR
FROM alpine:3.20 FROM alpine:3.20
ARG DEPENDENCY_DIR ARG DEPENDENCY_DIR
ARG USER_UID="1000"
ARG USER_GID=${USER_UID}
ARG USERNAME="flutter"
ENV FLUTTER_HOME="/flutter" ENV FLUTTER_HOME="/flutter"
ENV PATH=$PATH:$FLUTTER_HOME/bin ENV PATH=$PATH:$FLUTTER_HOME/bin
...@@ -35,5 +38,11 @@ COPY --from=download $DEPENDENCY_DIR / ...@@ -35,5 +38,11 @@ COPY --from=download $DEPENDENCY_DIR /
RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& apk add --no-cache --force-overwrite curl bash git tmp/glibc-2.35-r1.apk tmp/glibc-bin-2.35-r1.apk \ && apk add --no-cache --force-overwrite curl bash git tmp/glibc-2.35-r1.apk tmp/glibc-bin-2.35-r1.apk \
&& rm -r /tmp/* \ && rm -r /tmp/* \
&& dart --disable-analytics && flutter config --no-analytics \ && addgroup ${USERNAME} -g ${USER_GID} \
&& adduser ${USERNAME} --uid ${USER_UID} --ingroup ${USERNAME} --disabled-password \
&& chown -R ${USERNAME}:${USERNAME} ${FLUTTER_HOME}
USER ${USERNAME}
RUN dart --disable-analytics && flutter config --no-analytics \
&& flutter precache --universal && flutter precache --universal
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment