Skip to content

Instantly share code, notes, and snippets.

View cleytonferrari's full-sized avatar

Cleyton Ferrari cleytonferrari

View GitHub Profile
@cleytonferrari
cleytonferrari / Dockerfile
Created September 6, 2023 17:05 — forked from JesseObrien/Dockerfile
Dockerfile for asp dotnet core with timezone change, npm install, and two-stage build process. This uses the 'aspnetcore-build' container to produce the build with ALL of the SDK dependencies, and the 'aspnetcore' container to run the code itself, cutting down the production container's size.
FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN rm -rf node_modules && npm install

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs