1ARG NAMESPACE_BASE_IMAGE_REF=""
 2
 3# Your image must build FROM NAMESPACE_BASE_IMAGE_REF
 4FROM ${NAMESPACE_BASE_IMAGE_REF} AS base
 5
 6# Remove problematic git-lfs packagecloud source
 7RUN sudo rm -f /etc/apt/sources.list.d/*git-lfs*.list
 8# Install git and SSH for cloning private repositories
 9RUN sudo apt-get update && \
10    sudo apt-get install -y git openssh-client
11
12# Clone the Zed repository
13RUN git clone https://github.com/zed-industries/zed.git ~/zed
14
15# Run the Linux installation script
16WORKDIR /home/runner/zed
17RUN ./script/linux
18
19# Clean up unnecessary files to reduce image size
20RUN sudo apt-get clean && sudo rm -rf \
21    /home/runner/zed