Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential fix: docker-compose failure in scripts/install/deb.sh on dev branch #205

Open
crhbetz opened this issue Nov 24, 2023 · 1 comment

Comments

@crhbetz
Copy link

crhbetz commented Nov 24, 2023

Hi everyone.

On dev branch, after cloning the repository the initial docker compose up -d returned status 1 in scripts/install/deb.sh during install of unixodbc, because the command requests confirmation of installation of additional required packages, while the -y flag was missing.

Further, curl was attempted to be used before being installed as part of the list of dependencies.

Lastly, install of msodbcsql17 freezes on a EULA confirmation request.

The following diff should now be self-explaining and fixed these problems for me. It allowed me to run the dev branch through docker. Please use at your discretion. I didn't want to post a potentially unsuitable PR, because I'm otherwise not familiar with docker and its procedures, or other intricacies of your project.

diff --git a/scripts/install/deb.sh b/scripts/install/deb.sh
index fe0e8a2c..67881bc4 100755 
--- a/scripts/install/deb.sh
+++ b/scripts/install/deb.sh
@@ -88,6 +88,9 @@ fi


 echo "==== Installing Dependencies ===="


+echo "apt-get install dependencies"
+sudo ${APT_GET} install --no-install-recommends ${dependencies}
+
 #workaround for msodbcsql17...
 sudo apt-mark hold msodbcsql17containers-common || echo "workaround erred"


@@ -95,17 +98,15 @@ echo "Workaround #2 for msodbcsql17..."
 #workaround #2 for msodbcsql17...
 sudo apt-get install -y libodbc1
 sudo apt update
-sudo apt install unixodbc
+sudo apt install -y unixodbc
 curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
 echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main" | sudo tee /etc/apt/sources.list.d/mssql-release.list
 sudo apt update
-sudo apt install msodbcsql17
+sudo ACCEPT_EULA=Y apt install -y msodbcsql17


 echo "mysql setup..."
 sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password ${DB_ROOT_PASSWORD}"
 sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password ${DB_ROOT_PASSWORD}"
-echo "apt-get install dependencies"
-sudo ${APT_GET} install --no-install-recommends ${dependencies}


 # Where default-jdk is older version, it may be installed with a higher priority than v11
 for n in java javac; do
@andreasrosdal
Copy link
Contributor

andreasrosdal commented Jan 1, 2024

Hello, are you able to reproduce this bug in this project?

https://github.com/fciv-net/fciv-net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants