chore: Move docker files into main repo

Changes to Docker-related files/configuration don't occur in a vacuum.
They are made in coordination with changes to the main repository, so it
doesn't make sense to track them separately.

Note: Removing the 'windows' Docker files completely. No one has has
used them in a long, long time. The client build would be broken in
there anyways, the image is based on .NET Framework 3.5!
This commit is contained in:
John Colvin committed 2023-04-03 13:48:16 +00:00
1 parent fd3de056c1
commit 2a9f03741e
16 files changed
+986 -8

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Appends text to a file (unless the text is already there). This avoids
# duplicating lines when the container is rebuilt, since the container's file
# system is persisted on the host beyond the life of the container
function append_line_once() {
if [[ "$#" -ne 2 ]];
echo "`append_line_once` expects 2 args (text, file)"
exit 1
fi
text="$1"
file="$2"
declare -i num_matches="$(wc -l "$(grep "$text" "$file")")"
if [[ "$num_matches" -eq 0 ]]; then
echo "$text" >> "$HOME/.bashrc"
fi
}
append_path_cmd="export PATH=\$PATH:$HOME/.local/bin"
declare -i num_append_path_cmds="$(wc -l "$(grep "$append_path_cmd")")"
if [[ "$num_append_path_cmds" -eq 0 ]]; then
echo "$append_path_cmd" >> "$HOME/.bashrc"
fi