Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
FROM mcr.microsoft.com/mssql/server | ||
|
||
USER root | ||
|
||
RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \ | ||
dpkg -i packages-microsoft-prod.deb && \ | ||
apt-get update && \ | ||
apt-get -y install apt-transport-https && \ | ||
apt-get -y install dotnet-sdk-2.2 | ||
|
||
ENV ACCEPT_EULA=Y | ||
ARG MSSQL_SA_PASSWORD=SA_PASSWORD1. | ||
ENV DB_PREFIX=TEST_ | ||
|
||
WORKDIR /usr/bin/rdmp-cli | ||
|
||
COPY ./Tools/rdmp/bin/Debug/netcoreapp2.2/linux-x64/publish . | ||
COPY ./scripts/install-rdmp-docker.sh . | ||
RUN ./install-rdmp-docker.sh | ||
RUN rm ./install-rdmp-docker.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
|
||
# docker run -p 1433:1433 rdmp | ||
|
||
version: "3.7" | ||
|
||
services: | ||
rdmp: | ||
container_name: rdmp | ||
build: . | ||
ports: | ||
- 1433:1433 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -ev | ||
|
||
/opt/mssql/bin/sqlservr &> /dev/null & | ||
# TODO(rkm 2020-02-12) Find a better way to wait for the DB server to start... | ||
sleep 10 | ||
./rdmp install localhost $DB_PREFIX -u SA -p $MSSQL_SA_PASSWORD | ||
|
||
# NOTE(rkm 2020-02-12) Not needed for the installation, but allows the rdmp-cli to be used | ||
cat <<EOT > ./Databases.yaml | ||
CatalogueConnectionString: Server=localhost;user=SA;password=$MSSQL_SA_PASSWORD;Database=${DB_PREFIX}Catalogue; | ||
DataExportConnectionString: Server=localhost;user=SA;password=$MSSQL_SA_PASSWORD;Database=${DB_PREFIX}DataExport; | ||
EOT |