COPY template of systemfile to container + change the content

Hi,
Since I don’t really know which keywords to use for my question,
is it possible to change the content of a “file-example” like
something=${BRANCH} in something=master
by putting ENV in Dockerfile and then do COPY file /etc/file
Thanks in advance for all help