Skip to content

timecode/wrangler-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wrangler docker

Run wrangler commands via a docker container rather than have to install it! I've found this pretty useful as Mac OS support for wrangler can be sketchy™ (specifically the dev subcommand).

Build & Install

  1. Build the docker image from this repo:

    ./build.sh
  2. Copy this repo's wrangler file to somewhere in your $PATH:

    # ensure it's executable
    chmod +x wrangler
    
    cp wrangler /usr/local/bin/
    # if you don't want to mess with any other wrangler installs
    # rename this file something like wranglerdev and use that instead
    # e.g
    # cp wrangler /usr/local/bin/wranglerdev
    
    # OPTIONAL
    # check it's available
    which wrangler
    # -> /usr/local/bin/wrangler
    # or
    # which wranglerdev
    # -> /usr/local/bin/wranglerdev

Usage

Ensure the worker's wrangler.toml file includes the following:

[dev]
ip = "0.0.0.0"
port = 8787
local_protocol="http"
upstream_protocol="https"

From the worker's root directory, simply use wrangler as normal e.g.

cd my-worker

# wrangler help
wrangler dev
# or wranglerdev dev

# etc...

About

Run Cloudflare's wrangler commands via a docker container

Resources

Stars

Watchers

Forks

Packages

No packages published