Use grep instead of head|tail in Dockerfile
On lines 17 and 18 of the Dockerfile, you use head
and tail
to get the values you need. It won’t work if someone change the order of the line in the .env
file.
You should use grep to get the value you need. For ex:
RUN git clone $(head -2 .env | tail -1 | sed 's/AKTIVISDA_DATA=//') aktivisda-data
could be replaced by:
RUN git clone $(grep AKTIVISDA_DATA .env | sed 's/AKTIVISDA_DATA=//') aktivisda-data