don't dream your life, live your dreams !
Contents
# Use an official image of centos FROM centos # Set the working directory to /opt/docker WORKDIR /opt/docker # Copy the current directory contents into the container at /opt/docker ADD . /opt/docker # Install any needed packages RUN yum -y install epel-release # Define environment variable ENV MYENVVAR my-env-value # Run shell when the container launches CMD ["/bin/bash"]
docker build -t newcontainername . |
docker run -it newcontainername |
docker run -e MYENVVAR='new value' -it newcontainername [root@dcf332ea87ae docker]# echo $MYENVVAR new value |
Copyright © 2024 My linux world - by Marc RABAHI
Design by Marc RABAHI and encelades.
admin