Skip to content

feat: add flutter USER #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ LABEL org.opencontainers.image.source https://github.com/arifai/docker-flutter
LABEL org.opencontainers.image.description Flutter Docker image on Ubuntu Linux
LABEL org.opencontainers.image.licenses MIT

ENV DOCKER_USER root
ENV FLUTTER_DIR /home/${DOCKER_USER}
ENV PATH "$PATH:$FLUTTER_DIR/flutter/bin"
ENV DOCKER_USER flutter

ENV FLUTTER_DIR /home/flutter-sdk
RUN set -eux; mkdir -p ${FLUTTER_DIR}

ENV PATH "$PATH:$FLUTTER_DIR/flutter/bin"
WORKDIR ${FLUTTER_DIR}

# RUN set -eux; groupadd -r ${DOCKER_USER} \
# && useradd -r -g ${DOCKER_USER} ${DOCKER_USER}
RUN set -eux; groupadd -r ${DOCKER_USER} \
&& useradd -r -g ${DOCKER_USER} ${DOCKER_USER}

RUN set -eux; apt-get update && apt-get upgrade -y \
&& apt-get install clang cmake ninja-build pkg-config libgtk-3-dev -y --no-install-recommends \
Expand All @@ -27,10 +29,10 @@ RUN set -eux; apt-get update && apt-get upgrade -y \
&& apt-get autoremove \
&& apt-get autoclean

USER ${DOCKER_USER}

RUN set -eux; yes | flutter doctor --android-licenses \
&& flutter config --no-analytics \
&& flutter doctor -v

CMD ["flutter"]
USER ${DOCKER_USER}

CMD ["flutter"]