Mixing ENV and ARG variables

Report a typo

You are given a task to copy demo.txt file to /tmp directory inside the image using a Dockerfile. Arrange the lines to pass the host file name to the ENV variable using ARG so that the resulting Dockerfile is able to copy the specified file to /tmp. Assume, that ENTRYPOINT is the last line.

The Docker documentation will guide you if you're unfamiliar with such a configuration.

Put the items in the correct order
ENTRYPOINT ["ls", "/tmp"]
COPY $HOST_FILE /tmp
ENV HOST_FILE=$FILE
ARG FILE
FROM ubuntu:22.04
___

Create a free account to access the full topic