Linked Questions

0 votes
1 answer
2k views

Inside my dockerfile: ENV MY_ENCODED_VALUE="bXkgbmFtZSBpcyByYWtpYgo=" ENV MY_DECODED_VALUE=$(echo $MY_ENCODED_VALUE | base64 -d) in the second line, i want to decode the encoded value and put the ...
Rakib's user avatar
  • 13.2k
1 vote
0 answers
71 views

I have a line in a dockerfile to set the container's environment variable based on the output of an npm script: ENV BUILD_VERSION=$(npm pkg get version | sed 's/"//g') running npm pkg get ...
d-_-b's user avatar
  • 23.2k
0 votes
0 answers
25 views

This is my Dockerfile: FROM node:16.15.1-buster RUN npm pkg get version RUN VERSION=$(npm pkg get version) RUN echo "$VERSION" I am using this to build the image: docker build --progress ...
HelmBurger's user avatar
  • 1,308
17 votes
4 answers
65k views

Trying to run following command in the ubuntu 16.04 docker container root@mytest:/Linux_Insight_Agent# systemctl start ir_agent.service I have installed neede packages but at the time of starting the ...
Ashwani's user avatar
  • 545
9 votes
4 answers
13k views

I need to fill a variable in dockerfile with the result of a command Like in bash var=$(date) EDIT 1 date is a example. in my case i use FROM phusion/baseimage:0.9.17 so i want at each building use ...
SilentT's user avatar
  • 135
1 vote
4 answers
8k views

Im trying to run a python3 application in a docker container using CentOS 7 as the base image. So if I'm just playing with it interactively, I type scl enable rh-python36 bash That obviously switches ...
jzeef's user avatar
  • 729
1 vote
1 answer
2k views

I'm trying to export environment variables from a Docker container using a shell script. This script will run a command and save the output as an environment variable. These variables will be used by ...
Dinesh Kumar's user avatar
0 votes
2 answers
2k views

How to set to ENV content from file? Something like this: COPY file_with_content.txt ./ ENV MODEL=file_with_content.txt
ocean's user avatar
  • 27
0 votes
1 answer
939 views

I'm trying to asign the result of a powershell command to MY_VAR environment variable. I have tried several ways but I cannot get the variable to take the value of the operation. If I assign the ...
Alpha75's user avatar
  • 2,280
2 votes
2 answers
297 views

I have a bit of a weird situation where I need to source the output of a script to set up some environment variables (which are only known at build time) before several RUN steps in my Dockerfile. I ...
Peter's user avatar
  • 3,252
0 votes
0 answers
138 views

I have a Dockerfile that receives a PYTHON_VERSION ARG. I need both the full version for and the major versions only for FROM commands. Something like this: ARG PYTHON_VERSION # assume 3.10.10 FROM ...
Zach Moshe's user avatar
  • 3,000
1 vote
2 answers
123 views

In BASH we can change directory to an unknown name, using a * as a wildcard - for example: cd /some/*ing will change directory to cd /some/thing/ (if there is only 1 match for the wildcard) How can we ...
Danny Beckett's user avatar