fix: remove too complex rootless logic
This commit is contained in:
parent
c792f5c039
commit
c5ceb5d186
@ -1,11 +1,12 @@
|
|||||||
FROM docker.io/debian:12-slim as build
|
FROM docker.io/debian:12-slim as build
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
sdkmanager \
|
sdkmanager \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
ADD https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.24.4-stable.tar.xz /flutter.tar.xz
|
ADD https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.24.4-stable.tar.xz /flutter.tar.xz
|
||||||
RUN tar -C /opt/ --exclude=cache -xJf /flutter.tar.xz
|
RUN tar -C /opt/ -xJf /flutter.tar.xz
|
||||||
RUN sdkmanager \
|
RUN sdkmanager \
|
||||||
"build-tools;35.0.0" \
|
"build-tools;35.0.0" \
|
||||||
"cmdline-tools;9.0" \
|
"cmdline-tools;9.0" \
|
||||||
@ -13,7 +14,8 @@ RUN sdkmanager \
|
|||||||
"platforms;android-35"
|
"platforms;android-35"
|
||||||
|
|
||||||
FROM docker.io/debian:12-slim
|
FROM docker.io/debian:12-slim
|
||||||
RUN useradd -m app
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
RUN touch /.dockerenv
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
curl \
|
curl \
|
||||||
@ -21,8 +23,7 @@ RUN apt-get update \
|
|||||||
openjdk-17-jdk-headless \
|
openjdk-17-jdk-headless \
|
||||||
unzip \
|
unzip \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
COPY --from=build --chown=app:app /opt/ /opt/
|
COPY --from=build --chown=0:0 /opt/ /opt/
|
||||||
USER app
|
|
||||||
ENV PATH="/opt/flutter/bin:$PATH"
|
ENV PATH="/opt/flutter/bin:$PATH"
|
||||||
RUN flutter config --android-sdk /opt/android-sdk/ \
|
RUN flutter config --android-sdk /opt/android-sdk/ \
|
||||||
&& yes | flutter doctor --android-licenses > /dev/null
|
&& yes | flutter doctor --android-licenses > /dev/null
|
||||||
|
Loading…
Reference in New Issue
Block a user