I tried to replace a line in a Makefile with sed -i -e 's|$(bindir)\/embossupdate|:|' Makefile, but I got sed: can't read Makefile: No such file or directoryFROM ubuntu:16.04...# EMBOSS (ftp://emboss.open-bio.org/pub/EMBOSS/)ENV EMBOSS_VER 6.6.0RUN apt-get install libhpdf-dev libpng12-dev libgd-dev -yADD EMBOSS-${EMBOSS_VER}.tar.gz /usr/local/WORKDIR /usr/local/EMBOSS-${EMBOSS_VER}RUN sed -i -e 's|$(bindir)\/embossupdate|:|' Makefile        RUN ./configure  --enable-64 --with-thread  --without-xRUN makeRUN ldconfigRUN make installWhat did I do wrong with the sed command?
sed: can't read Makefile: No such file or directory
sed;compiling;configure
The Makefile is not created until you've run the configure script.  Try placing the sed command after the invocation of configure.I haven't checked if the sed edit is doing what it should or not, but the main issue is probably that the Makefile simply doesn't exist yet at that point in your script.In general, I would avoid sed -i as its semantics is different for GNU and BSD sed. It's safer to sed ... file >tmpfile && mv tmpfile file. 