Hey John,
I am not sure that helps as I was trying to do it in the DockerFile that creates the container. I was thinking if I did it in the docker file to be part of the container creation then I am able to add this to the AppHost so that the file deploys with the AppHost. My understanding is that if I change the container after it is already running, if it reboots, it resets it back to the original image. Plus I am not sure how I would go about getting the AppHost to run that command during the deployment.
Basically I have a driver that I need to use to run part of my python script. I have that drive zipped up and in the zip folder of the app and was trying to write into the dockerfile the command to copy that file into the container, unzip it to the location I need it, and then set the environment variables to know where these drivers are. below is what I was trying, but it says it can't find the file.
RUN unzip data/driver.zip -d /opt/
ENV DRIVER_HOME /opt/driver/
ENV DRIVER_LIB /opt/driver/lib/
Hopefully this helps give context behind what I am doing.
Thanks!
------------------------------
Nick Mumaw
------------------------------
Original Message:
Sent: Fri May 07, 2021 07:01 AM
From: JOHN PRENDERGAST
Subject: Installing Local App in Dockerfile
Hi Nick,
There there are a number of ways to copy files into a container after it starts running including the following:
When starting the container map a local file to container file.
docker run -v <local_path_to_file>/<file>:/<container_path_to_file>/<file> <image_name_id>
After container has started copy a local file to container file path:
docker cp <local_path_to_file>/<file> <container_name_or_id>:/<container_path_to_file>
Does this help?
Regards,
------------------------------
JOHN PRENDERGAST
Original Message:
Sent: Thu May 06, 2021 04:05 PM
From: Nick Mumaw
Subject: Installing Local App in Dockerfile
I am fairly new to Docker and working on learning it. One of the questions is if I wanted to include a zip file that Docker will unzip and deploy in the container during deployment, how would I go about putting that file in my app to ensure that it when it deploys it is added to my container.
Thanks in advance!
------------------------------
Nick Mumaw
------------------------------