Skip to content

Commit

Permalink
Fix - Database restore fails with is empty
Browse files Browse the repository at this point in the history
Short Summary
When the container is built from Docker Hub, the file `WideWorldImporters-Full.bak` is
not copied into the container. This is because docker hub, doesn't support GIT LFS.

Error Message: `The volume on device '/var/opt/sqlserver/WideWorldImporters-Full.bak' is empty.`

Why is it necessary? (Bug fix, feature, improvements?)
- Database was not restoring

How does the change address the issue?
- Using ADD which can access files from URL's

Include a link to the ticket, if any.
- docker/hub-feedback#500
  • Loading branch information
kgeorge314 committed Jul 10, 2019
1 parent 428041a commit d58fcda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ RUN mkdir /var/opt/sqlserver

# copy attach-db.sh into container
COPY restore-db.sh /var/opt/sqlserver
# copy backupfile
COPY ./database/WideWorldImporters-Full.bak /var/opt/sqlserver

# USE ADD
ADD https://github.com/aleta-systems/aletasystems.role.data.engineer.phase1/raw/master/database/WideWorldImporters-Full.bak /var/opt/sqlserver/

# set script executable
RUN ["chmod", "+x", "/var/opt/sqlserver/restore-db.sh"]
Expand Down

0 comments on commit d58fcda

Please sign in to comment.