Setting up SugarDockerized on Windows

I am settting up SugarDockerized on Windows 11. I have installed Docker Desktop and successfully run `./utilities/stack.sh 14 up` in the sugardockerized folder.

I ran this with a backup downloaded from sugar insight 

Fullscreen
1
./utilities/restorefromfile.sh ~/Downloads/xyz.sugarondemand.com.1420.1746006357.9a72e4e8b2f9480ba25edc649b0529b77c8d4b37.tar.gz
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
and got a message that said, "the input device is not a TTY.  If you are using mintty, try prefixing the command with 'winpty'"

So I ran 

Fullscreen
1
winpty bash ./utilities/restorefromfile.sh ~/Downloads/xyz.sugarondemand.com.1420.1746006357.9a72e4e8b2f9480ba25edc649b0529b77c8d4b37.tar.gz
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

That seemed to work, but eventually errored out with this:

Fullscreen
1
2
3
4
5
6
7
Starting restore at Wed Apr 30 17:01:05 EDT 2025
Cleaning up previous install (./data/app/sugar) if any, please wait...
Decompressing C:/Users/username/Downloads/xyz.sugarondemand.com.1420.1746006357.9a72e4e8b2f9480ba25edc649b0529b77c8d4b37.tar.gz, please wait...
tar: Cannot connect to C: resolve failed
mv: cannot stat './data/app/tmp/*.sql': No such file or directory
mv: cannot stat './data/app/tmp/sugar*': No such file or directory
"./data/app/tmp/sugar" cannot be empty
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Is there something I need to do differently? 

Parents
  •  Hi  ,

    All of those commands were linux/macos/unix tested but not on Windows. I'm not familiar with winpty bash but seems like an awesome tool.

    It seems to me that untar: "tar -xf $1 -C $TEMP_FOLDER --strip-components=1" failed to extract to the $TEMP_FOLDER, in this case ./data/app/tmp

    the tar command might not be entirely supported by winpty, try to execute it on manually and see the output

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

  • Thank you, Rafael.

    I ran `mkdir -p ./data/app/tmp` and then `tar -xf "/c/Users/username/Downloads/xyz.sugarondemand.com.1420.1746006357.9a72e4e8b2f9480ba25edc649b0529b77c8d4b37.tar.gz" -C "./data/app/tmp" --strip-components=1`.

    That extracted all the files to `./data/app/tmp`.

    Fullscreen
    1
    2
    3
    MINGW64 ~/desktop/sugardockerized/data/app/tmp (master)
    $ ls ./data/app/tmp
    sugar1420/ sugar1420.sql sugar1420_triggers.sql
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    So I tried re-running `winpty bash ./utilities/restorefromfile.sh ~/Downloads/xyz.sugarondemand.com.1420.1746006357.9a72e4e8b2f9480ba25edc649b0529b77c8d4b37.tar.gz`, but I got the same response as before and `/data/app/tmp` now only has an empty sql directory.

    What should I do after extracting the data to `/data/app/tmp` to continue the process?

  • hi  ,

    That's good, means winpty is compatible, so you can now follow restorefromfile.sh's instructions, next step would be this https://github.com/sugarcrm-developers/SugarDockerized/blob/master/utilities/restorefromfile.sh#L47 

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

  • Is there a way to check if everything is set up correctly? 

    I'm getting this in my browser at docker.local/sugar/

    Not Found

    The requested URL was not found on this server.


    Apache/2.4.62 (Win64) PHP/8.3.14 mod_fcgid/2.3.10-dev Server at docker.local Port 80

    I do have docker.local in my hosts file for 127.0.0.1. I am not using a VM.

    Here is a screenshot of the last few commands I ran in that should have completed the setup.

    Everything seems to be running in Docker Desktop:

    sugar-permissions stops running after a few minutes. Is that expected?

  • This is working now. I had installed WAMP server prior to this, and it seemed to be interfering with docker. When I stopped all WAMP services, I was able to see my sugar instance at docker.local/sugar.
  • Hi  ,

    that's good, you're close! sugar-permissions will set the required permissions to the sugar user on your installation files, it will execute only once and it's done. you should "restart" your sugar-web1 container after permissions execute.

    that could be the reason why you're getting Not-found error as the container doesn't have permission to the files.

    if you did that and still doesn't work, there are few checks you can do:

    1. Check if .htaccess is in the root directory
    2. Re-run sugar-permissions container and restart sugar-web1 to ensure all files have the required permissions
    3. Check if port 80 and others are listening (this is the command for MacOS: 

      sudo lsof -PiTCP -sTCP:LISTEN | grep -i dock)

    4. check if "sugar" database was created successfully in the DB container with all the tables in there.
    5. When you hit http://docker.local/sugar, check your <sugar install>/sugarcrm.log, it should give you exact what the issue is (if sugar related)
    6. Open the sugar-web1 console and see if it logs anything useful

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

Reply
  • Hi  ,

    that's good, you're close! sugar-permissions will set the required permissions to the sugar user on your installation files, it will execute only once and it's done. you should "restart" your sugar-web1 container after permissions execute.

    that could be the reason why you're getting Not-found error as the container doesn't have permission to the files.

    if you did that and still doesn't work, there are few checks you can do:

    1. Check if .htaccess is in the root directory
    2. Re-run sugar-permissions container and restart sugar-web1 to ensure all files have the required permissions
    3. Check if port 80 and others are listening (this is the command for MacOS: 

      sudo lsof -PiTCP -sTCP:LISTEN | grep -i dock)

    4. check if "sugar" database was created successfully in the DB container with all the tables in there.
    5. When you hit http://docker.local/sugar, check your <sugar install>/sugarcrm.log, it should give you exact what the issue is (if sugar related)
    6. Open the sugar-web1 console and see if it logs anything useful

    Rafael Fernandes

    Staff Developer Advocate | SugarCRM

Children
No Data