Copy project into image instead of cloning
Docker `RUN` statements cache based on the text of the command executed, not the content of what it does to the image. Since the command was cloning the project, and the text didn't change, building the image would not update the code if the image was already cached. This lead to a stale Docker image distributed on Docker Hub. This could also cause some confusion, as modified code would not show up on the image during the build process. This commit changes the build process to copy the content of the project into the image. Whenever a file changes it will trigger a new updated image.
This commit is contained in:
parent
4f599c0b0b
commit
e9f9c1ec5d
1 changed files with 2 additions and 2 deletions
|
@ -45,8 +45,8 @@ RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
|
|||
&& chown -R pptruser:pptruser /node_modules
|
||||
|
||||
# Install the ArchiveBox repository and pip requirements
|
||||
RUN git clone https://github.com/pirate/ArchiveBox /home/pptruser/app \
|
||||
&& mkdir -p /data \
|
||||
COPY . /home/pptruser/app
|
||||
RUN mkdir -p /data \
|
||||
&& chown -R pptruser:pptruser /data \
|
||||
&& ln -s /data /home/pptruser/app/archivebox/output \
|
||||
&& ln -s /home/pptruser/app/bin/* /bin/ \
|
||||
|
|
Loading…
Add table
Reference in a new issue