Skip to content

Commit

Permalink
Fix Docker invocation (#300)
Browse files Browse the repository at this point in the history
* fix syntax error in Dockerfile

* fix Docker invocation

It makes no sense to pass the `-t` argument twice and we need to tell
Docker where to find the Dockerfile. Also, it makes sense to write the
config file in a standard location. In my tests, I also had to create
the directory by hand otherwise I got this error:

    cdparanoia can defeat the audio cache on this drive.
    Adding drive cache behaviour to configuration file.
    Traceback (most recent call last):
      File "/usr/local/bin/whipper", line 11, in <module>
        load_entry_point('whipper==0.7.0', 'console_scripts', 'whipper')()
      File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/main.py", line 36, in main
        ret = cmd.do()
      File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/basecommand.py", line 139, in do
        return self.cmd.do()
      File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/basecommand.py", line 139, in do
        return self.cmd.do()
      File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/command/drive.py", line 63, in do
        info[0], info[1], info[2], t.defeatsCache)
      File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/common/config.py", line 115, in setDefeatsCache
        section = self._findOrCreateDriveSection(vendor, model, release)
      File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/common/config.py", line 164, in _findOrCreateDriveSection
        self.write()
      File "/usr/local/lib/python2.7/dist-packages/whipper-0.7.0-py2.7.egg/whipper/common/config.py", line 58, in write
        shutil.move(path, self._path)
      File "/usr/lib/python2.7/shutil.py", line 316, in move
        copy2(src, real_dst)
      File "/usr/lib/python2.7/shutil.py", line 144, in copy2
        copyfile(src, dst)
      File "/usr/lib/python2.7/shutil.py", line 97, in copyfile
        with open(dst, 'wb') as fdst:
    IOError: [Errno 13] Permission denied: u'/home/worker/.config/whipper/whipper.conf'

* remove needless tag version

:latest is implicit so it's useless noise as well.

* Update README.md
  • Loading branch information
anarcat authored and JoeLametta committed Oct 3, 2018
1 parent cfcbfd5 commit 6d7e54f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN mkdir /whipper
COPY . /whipper/
RUN cd /whipper/src && make && make install \
&& cd /whipper && python2 setup.py install \
&& rm -rf /whipper
&& rm -rf /whipper \
&& whipper -v

# add user
Expand Down
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,22 @@ Whipper still isn't available as an official package in every Linux distribution

You can easily install whipper by making use of the included Dockerfile without needing to care about the required dependencies:

`docker build -t whipper/whipper:0.7-git -t whipper/whipper:latest`
`docker build -t whipper/whipper`

It's recommended to create an alias for a convenient usage:

```bash
alias whipper="docker run -ti --rm --device=/dev/cdrom \
-v ${PWD}/config:/home/worker/.config/whipper \
-v ~/.config/whipper:/home/worker/.config/whipper \
-v ${PWD}/output:/output \
whipper/whipper"
```

You should put this e.g. into your `.bash_aliases`. Also keep in mind to substitude the path definitions to something that fits to your needs (e.g. replace `… -v ${PWD}/output:/output …` with `… -v ${HOME}/ripped:/output \ …`).
You should put this e.g. into your `.bash_aliases`. Also keep in mind to substitute the path definitions to something that fits to your needs (e.g. replace `… -v ${PWD}/output:/output …` with `… -v ${HOME}/ripped:/output \ …`).

Make sure you create the configuration directory:

`mkdir -p ~/.config/whipper ${PWD}/output`

Finally you can test the correct installation:

Expand Down

0 comments on commit 6d7e54f

Please sign in to comment.