nginx-le
  • Overview
  • Prerequisites
  • Cli commands
    • build
    • config
    • start
    • acquire
    • certificates
    • cli
    • doctor
    • logs
    • renew
    • restart
    • revoke
    • stop
  • docker-compose
  • Certificate management
    • Staging (test) certificates
    • Certificate volume
  • Customise Nginx-le container
  • Diagnosing problems
  • Environment variables
    • Internal Environment Variables
      • Auth Providers
  • Contributing
    • Testing
    • Releasing nginx-le
  • Custom Content Providers
  • Custom docker file
  • Auth Providers
    • HTTP Auth
    • Cloudflare
    • Name cheap
    • Implement an Auth Provider
Powered by GitBook
On this page
  • Building Nginx-LE
  • Switches

Was this helpful?

  1. Cli commands

build

PreviousCli commandsNextconfig

Last updated 4 years ago

Was this helpful?

Building Nginx-LE

Most users of Nginx-LE will never need to run a build. The build tooling is primarily used by the Nginx-LE development team and if you need to customize the code that underpins the Nginx-LE docker image.

When do you need to use the build command?

Method

Build Required

Usage

Customise nginx or the Nginx-LE code

Yes

Get your hands dirty and modify the core of Nginx-LE.

Extend the Image

Maybe

Create your own Dockerfile based on Nginx-LE. You can use the standard docker tools to build the image if you aren't modifying any of the Nginx-LE code.

Serve static content

No

Mount a volume with your static content into /opt/nginx/wwwroot

Configure your own Location(s)

No

Add nginx compatible .location files under /opt/nginx/include

Configure as Proxy

No

Add nginx compatible .location and .upstream files under /opt/nginx/include

Docker-compose

No

Add Nginx-LE as a service in a docker-compose.yaml file.

For details on creating or modifying the docker file see

To build the Nginx-LE image run:

git clone https://github.com/bsutton/nginx-le.git
nginx-le build --image=<repo/image:version>

Switches

The build command takes a number of switches.

image

The required --image switch sets the docker image/tag name (repo/image:version) for the image.

e.g. --image=noojee/nginx-le:1.0.0

The switch can be abbreviated to -i.

update-dcli

The optional flag --update-dcli causes the build to pull the latest version of dart/dcli rather than using the docker cache instance.

You only need to add this switch if you have an existing build and you need to update the dcli/dart version.

debug

The optional flag --debug outputs additional build information.

The flag can be abbreviated to -d.

Create aDockerfile