How create docker build and use ARG in ENTRYPOINT

I try to create dockerbuild file,
in the file i use ARG.
and when i use in ENTRYPINT its not get the ARG.
how i can use its ?


Hey there! How about you assign the ARG value to an ENV? This way the container you run from the image will have access to the value :slight_smile:

Like so:
ARG some_variable_name
ENV env_var_name=$some_variable_name

You can read up on the difference between ARG and ENV here.

tnx for response.
this don’t work.
i try copy script into image and when i run image i wont run this script through ENTRYPOINT
this is error log from “docker logs id”
/bin/sh: [/opt/]: No such file or directory

can you post an example of your entrypoint and your Dockerfile?

it’s work i use arg and env
tnx vsupalov