Skip to content

Commit

Permalink
Merge pull request #25 from equinor/non-root
Browse files Browse the repository at this point in the history
Update non-root container + change date format for blobs and increase sleepInterval
  • Loading branch information
sebastas authored Jul 11, 2024
2 parents 0416962 + bc8be09 commit 29666c7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ FROM mcr.microsoft.com/dotnet/runtime:5.0 AS run
LABEL org.opencontainers.image.source="https://github.com/equinor/ms-continuus"
WORKDIR /app

COPY --from=build /app/out .
ADD src/version /app/src/version

RUN groupadd -g 1000 dotnet-non-root-group
RUN useradd -u 1000 -g dotnet-non-root-group dotnet-non-root-user && chown -R 1000 /app
USER 1000

COPY --from=build /app/out .
ADD src/version /app/src/version
CMD ["dotnet", "ms-continuus.dll"]
2 changes: 1 addition & 1 deletion src/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Api
private readonly string _migrationsUrl = $"{Config.GithubURL}/orgs/{Config.Organization}/migrations";
private readonly string _repoUrl = $"{Config.GithubURL}/orgs/{Config.Organization}/repos";

private readonly string DateToday = $"{DateTime.Now:dd_MM_yyyy}";
private readonly string DateToday = $"{DateTime.Now:yyyy_MM_dd}";

public Api()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ private static async Task<bool> DownloadAndUpload(Migration migration, int index
{
Migration migStatus = await Api.MigrationStatus(migration.Id);
var exportTimer = 0;
const int sleepIntervalSeconds = 30;
const int sleepIntervalSeconds = 60;
while (migStatus.State != MigrationStatus.exported)
{
Thread.Sleep(sleepIntervalSeconds * 1_000);
Expand Down
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.0.2

0 comments on commit 29666c7

Please sign in to comment.