Docker commands
This commit is contained in:
parent
d37ed1c01a
commit
3c4e465084
66
.vscode/tasks.json
vendored
66
.vscode/tasks.json
vendored
@ -88,6 +88,72 @@
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "dockerLogin",
|
||||
"command": "docker",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"login",
|
||||
"gitea.phares.duckdns.org:443"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "dockerBuild",
|
||||
"command": "docker",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"-t",
|
||||
"kanbn-to-quartz"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "dockerImageList",
|
||||
"command": "docker",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"image",
|
||||
"ls"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "dockerRun",
|
||||
"command": "docker",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"run",
|
||||
"-p",
|
||||
"5001:5001",
|
||||
"--name",
|
||||
"kanbn-to-quartz-api-001",
|
||||
"cb5bbb2e84e7"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "dockerTag",
|
||||
"command": "docker",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"tag",
|
||||
"b84c1f73de01",
|
||||
"gitea.phares.duckdns.org:443/phares3757/kanbn-to-quartz:latest"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "dockerPush",
|
||||
"command": "docker",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"push",
|
||||
"gitea.phares.duckdns.org:443/phares3757/kanbn-to-quartz:latest"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "Publish AOT",
|
||||
"command": "dotnet",
|
||||
|
@ -23,8 +23,3 @@ EXPOSE 5001
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT [ "dotnet", "KanbnToQuartz.dll" ]
|
||||
|
||||
# docker build -t sprint-console-001 .
|
||||
# docker images ls | grep -i 001
|
||||
# docker run -p 5001:5001 --name sprint-console-api-001 sprint-console-001
|
||||
# docker run -p 5001:5001 --name sprint-console-api-001 sprint-console-001
|
@ -6,6 +6,7 @@ namespace KanbnToQuartz.Models;
|
||||
public record AppSettings(string Company,
|
||||
string Destination,
|
||||
string DirectoryFindReplace,
|
||||
string DirectoryBFindReplace,
|
||||
string FileFindReplace,
|
||||
string Source,
|
||||
string TextBFindReplace,
|
||||
|
@ -18,6 +18,7 @@ public class CopyService
|
||||
List<Record> results = [];
|
||||
string path;
|
||||
string fileB;
|
||||
string pathB;
|
||||
string textB;
|
||||
string? text;
|
||||
Record record;
|
||||
@ -37,6 +38,7 @@ public class CopyService
|
||||
string sourceDirectoryName = Path.GetDirectoryName(sourceDirectory);
|
||||
string destinationDirectory = Path.GetFullPath(appSettings.Destination);
|
||||
string[] directoryFindReplace = appSettings.DirectoryFindReplace.Split('|');
|
||||
string[] directoryBFindReplace = appSettings.DirectoryBFindReplace.Split('|');
|
||||
string[] files = Directory.GetFiles(sourceDirectory, "*", SearchOption.AllDirectories);
|
||||
int sourceDirectoryLength = sourceDirectory.Length;
|
||||
foreach (string file in files)
|
||||
@ -56,8 +58,9 @@ public class CopyService
|
||||
if (!lines[i].StartsWith(textBFindReplace))
|
||||
continue;
|
||||
path = lines[i].Substring(textBFindReplace.Length, lines[i].Length - 1 - textBFindReplace.Length);
|
||||
pathName = Path.GetFileName(path);
|
||||
relativePath = Path.GetRelativePath(sourceDirectoryName, path);
|
||||
pathB = string.IsNullOrEmpty(directoryBFindReplace[0]) ? path : path.Replace(directoryBFindReplace[0], directoryBFindReplace[1]);
|
||||
pathName = Path.GetFileName(pathB);
|
||||
relativePath = Path.GetRelativePath(sourceDirectoryName, pathB);
|
||||
lines[i] = $"- [{pathName}]({relativePath})";
|
||||
}
|
||||
textB = string.Join(Environment.NewLine, lines);
|
||||
|
Loading…
x
Reference in New Issue
Block a user