-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
27 lines (22 loc) · 954 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM ubuntu:latest
ARG TARGETARCH
ENV FVM_DIR=/opt/.fvm_flutter
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y \
curl git unzip xz-utils zip libglu1-mesa \
clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev \
libsecret-1-dev libsecret-1-0
RUN ARCH=$(case $TARGETARCH in \
x86_64) echo 'x64' ;; \
arm64|aarch64) echo 'arm64' ;; \
armv7l) echo 'arm' ;; \
esac) \
&& FVM_VERSION=$(curl -s https://api.github.com/repos/leoafarias/fvm/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') \
&& URL=https://github.com/leoafarias/fvm/releases/download/$FVM_VERSION/fvm-$FVM_VERSION-linux-$ARCH.tar.gz \
&& curl -L $URL -o fvm.tar.gz \
&& mkdir -p $FVM_DIR \
&& tar xzf fvm.tar.gz -C $FVM_DIR \
&& rm -f fvm.tar.gz \
&& ln -sf $FVM_DIR/fvm/fvm /usr/local/bin/fvm
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y