OpenCATS icon indicating copy to clipboard operation
OpenCATS copied to clipboard

docker on windows error when creating database

Open skrchnavy opened this issue 9 years ago • 2 comments

file db/cats_schema.sql is text file and when repository cloned on windows, file contains [CR][LF] line endings. When using docker to run OpenCATS, wizzard fails during creation of DB schema. Reason is that it requires [LF] line endings as docker image is based on linux / ubuntu.

Workaround: To open file in an editor and save it with Unix line endings localy. Solution (?): setup schema file to be binary in repository. Not sure how it works wioth MySQL/MariaDB installed on windows.

skrchnavy avatar Jul 26 '16 09:07 skrchnavy

we could also use DOS2UNIX tool to convert the file..


Russ

On 26 July 2016 at 10:18, Sveto Krchnavy [email protected] wrote:

file db/cats_schema.sql is text file and when repository cloned on windows, file contains [CR][LF] line endings. When using docker to run OpenCATS, wizzard fails during creation of DB schema. Reason is that it requires [LF] line endings as docker image is based on linux / ubuntu.

Workaround: To open file in an editor and save it with Unix line endings localy. Solution (?): setup schema file to be binary in repository. Not sure how it works wioth MySQL/MariaDB installed on windows.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/opencats/OpenCATS/issues/93, or mute the thread https://github.com/notifications/unsubscribe-auth/AARQfNJ1rgPZmRLCNuhIdUxtGZoX-OjFks5qZdDNgaJpZM4JU8fj .

RussH avatar Jul 26 '16 09:07 RussH

Problem is in case when you have mounted windows FS to docker. in docker-compose.yml there is

    dataphp:
      image: busybox
      volumes:
        - ..:/var/www/public
      command: "true"

so not sure where to put the conversion tool.

this is place where is schema file loaded: https://github.com/opencats/OpenCATS/blob/b97b31fbf77657311c9c97d020c9273dc9cba2a8/modules/install/ajax/ui.php#L752 so could be added some replacement tool. But not sure about proper solution.

skrchnavy avatar Jul 26 '16 13:07 skrchnavy