Skip to content

Instantly share code, notes, and snippets.

@newdigate
Created October 8, 2023 19:58
Show Gist options
  • Save newdigate/7c2912cf665aafe23fa842f43b1446b8 to your computer and use it in GitHub Desktop.
Save newdigate/7c2912cf665aafe23fa842f43b1446b8 to your computer and use it in GitHub Desktop.
run nuget server locally.sh
docker run --detach=true \
--publish 5000:8123 \
--env NUGET_API_KEY=1234 \
--volume /Users/nicholasnewdigate/Development/nuget-server:/var/www/db \
--volume /Users/nicholasnewdigate/.nuget/packages:/var/www/packagefiles \
--name nuget-server \
sunside/simple-nuget-server
@newdigate
Copy link
Author

newdigate commented Oct 22, 2023

$ find ~/.nuget/packages -name *.nupkg | xargs -I{} nuget push {} -Source http://nuget.local/nuget -SkipDuplicate

@newdigate
Copy link
Author

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="Local" value="http://nuget.local/nuget" />
  </packageSources>
  <activePackageSource>
    <add key="All" value="(Aggregate source)" />
  </activePackageSource>
  <apikeys>
    <add key="http://nuget.local/nuget" value="...==" />
  </apikeys>
</configuration>

@newdigate
Copy link
Author

newdigate commented Oct 22, 2023

apiVersion: skaffold/v2beta18
kind: Config
metadata:
  name: frontend
build:
  # defines where to find the code at build time and where to push the resulting image
  artifacts:
  - image: dotnet-guestbook-frontend
    context: .
    docker:
      dockerfile: Dockerfile.debug
      addHost:
      - "nuget.local:127.0.0.1"
      network: host
# defines the Kubernetes manifests to deploy on each run
deploy:
  kubectl:
    manifests:
    - ./kubernetes-manifests/*.yaml
portForward:
  # Cloud Code automatically port forwards resources,
  # or users can define explicit port forwards here.
  # For more info, visit https://skaffold.dev/docs/pipeline-stages/port-forwarding/#UDPF
  - resourceType: service
    resourceName: dotnet-guestbook-frontend
    port: 80
    localPort: 4503
profiles:
# use the cloudbuild profile to build images using Google Cloud Build
- name: cloudbuild
  build:
    googleCloudBuild: {}
- name: buildpacks
  build:
    artifacts:
    - image: dotnet-guestbook-frontend
      context: .
      buildpacks:
        builder: "gcr.io/buildpacks/builder:v1"
- name: release
  patches:
  - op: replace
    path: /build/artifacts/0/docker/dockerfile
    value: Dockerfile.release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment