Dotnet

Dotnet is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large class library named Framework Class Library (FCL) and provides language interoperability (each language can use code written in other languages) across several programming languages. You can easily add it to your Lando app by adding an entry to the services key in your app's .lando.yml.

Supported versions

Using patch versions

While Lando does not "officially" support specifying a patch version of this service you can try specifying one using overrides if you need to. This is not guaranteed to work so use at your own risk and take some care to make sure you are using a debian flavored patch version that also matches up with the major and minor versions of the service that we indicate above in "Supported versions".

Here are all the tags that are available for this service.

Here is an example of overriding the nginx service to use a patched version.

# The name of my app
name: patchversion

# Give me http://patchversion.lndo.site and https://patchversion.lndo.site
proxy:
  appserver:
    - patchversion.lndo.site

# Configure my services
services:

  # Create an nginx service called "appserver"
  appserver:

    # Set this to custom so we can override down the stream
    type: nginx:custom

    # SSL
    ssl: true

    # Override the image with the patch version
    # Note that this needs to be a correct namespace on the docker hub
    overrides:
      services:
        image: nginx:1.12.1

# Quick comamnd to check the nginx version
tooling:
  nginx:
    service: appserver

You can check out the full code for this example over here.

Example

# dotnet app
name: dotnet

# Give me http://dotnet.lndo.site and https://dotnet.lndo.site
proxy:
  appserver:
    - dotnet.lndo.site

# Spin up services to run a basic dotnet server
services:

  # Create a dotnet instance
  appserver:

    # dotnet version 2.0
    type: dotnet:2.0

    # Optionally create certs in /certs that can be used by your application
    # to listen over https. Creates the following certs your app can use
    #
    #   - /certs/cert.key
    #   - /certs/cert.crt
    #   - /certs/cert.pem
    #
    # ssl: true

    # Optionally specify a command/script to run when you start your dotnet service up.
    #
    # If you are using dotnet as a server you are going to want to define this.
    # This can be either a string or array.
    #
    # If you are just spinning up a dotnet container for usage as a cli tool
    # you can leave this blank and the container will boot up and stay on
    #
    # You will likely want to run needed build steps eg `lando pip install`
    # first so needed dependencies are installed before your server starts up.
    #
    command: cd /app & dotnet run

    # Install some extra server packages
    # run_as_root:
    #  - "apt-get update -y"
    #  - "apt-get install vim -y"

    # Print a message just to demonstrate this
    # run:
    # - "cd $LANDO_MOUNT & echo 'Holla!'"

# Add some nice command routing
tooling:

  # Any dotnet service with a defined command (aka not running in cli only mode)
  # Will also spin up a dotnet cli container called `SERVICENAME_cli` (appserver_cli)
  # in this example.
  #
  # This will allow you to run things like `lando dotnet publish` without needing
  # to `lando start` first.
  dotnet:
    service: appserver_cli

You will need to rebuild your app with lando rebuild to apply the changes to this file. You can check out the full code for this example over here.

results matching ""

    No results matching ""