我正在尝试安装Docker镜像,并希望在运行容器时预先安装某些Homebrew软件包。虽然我能够成功构建它并且版本语句也正常工作,但是当我运行后,这些已安装的软件包却丢失了。有任何想法我做错了什么吗?
RUN git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew \
&& mkdir ~/.linuxbrew/bin \
&& ln -s ../Homebrew/bin/brew ~/.linuxbrew/bin \
&& eval $(~/.linuxbrew/bin/brew shellenv) \
&& brew --version \
&& brew tap aws/tap && brew install aws-sam-cli \
&& sam --version