When I execute docker build .
in the directory with the Dockerfile below, I get the following error:
Error response from daemon: Unknown instruction: &&
Why doesn't the &&
in my Dockerfile work? I see it used all the time in other Dockerfiles to string together commands.
I'm using Docker version 1.13.1, build 47e2230/1.13.1 on Fedora 30.
Dockerfile:
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
curl \
&& mkdir -p /opt/google/
&& curl -sSL "https://dl.google.com/dl/android/studio/ide-zips/3.5.0.21/android-studio-ide-191.5791312-linux.tar.gz" -o /opt/google/android-studio.tar.gz \
&& tar -xzf /opt/google/android-studio.tar.gz \
&& cd /opt/google/android-studio/bin/./studio.sh \
&& rm /opt/google/android-studio.tar.gz \
&& echo "PATH=${PATH}:/opt/google/android-studio/bin" >> ~/.profile
mkdir -p /opt/google/
, perhaps? Also, I find thecurl
on its own line rather disturbing.