Skip to content

Commit

Permalink
update docs for docker pull using github package
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Glenn committed Sep 6, 2021
1 parent 2aea8c2 commit ae4cb7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 29 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ export COMPOSE_DOCKER_CLI_BUILD := 1
ifndef HOSTIP
ifeq ($(OS),Windows_NT)
HOSTIP := $(shell powershell -command '(Get-NetIPConfiguration | Where-Object {$$_.IPv4DefaultGateway -ne $$null -and $$_.NetAdapter.Status -ne "Disconnected"}).IPv4Address.IPAddress' )
UPSTREAM_DNS := $(shell powershell -command '(Get-NetRoute | where {$$_.DestinationPrefix -eq '0.0.0.0/0'} | select { $$_.NextHop }' )
# UPSTREAM_DNS := $(shell powershell -command '(Get-NetRoute | where {$$_.DestinationPrefix -eq '0.0.0.0/0'} | select { $$_.NextHop }' )
else
UNAME_S := $(shell uname -s)
UPSTREAM_DNS = $(shell /sbin/ip route | awk '/default/ { print $$3 }')
# UPSTREAM_DNS = $(shell /sbin/ip route | awk '/default/ { print $$3 }')
ifeq ($(UNAME_S),Linux)
HOSTIP := $(shell ip route get 1 | head -1 | awk '{print $$7}' )
endif
Expand Down
31 changes: 5 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Joyride watches for containers starting and stopping via docker events seen on /
Example:
```
HOSTIP=$(ip route get 1 | head -1 | awk '{print $7}')
docker build -t ilude/joyride .
docker run -e HOSTIP=$(HOSTIP) ilude/joyride
docker pull ghcr.io/ilude/joyride:latest
docker run -e HOSTIP=$(HOSTIP) ghcr.io/ilude/joyride
# pull and start an example whoami container
docker pull traefik/whoami
Expand All @@ -17,37 +17,16 @@ docker run -l joyride.host.name=whoami.example.com traefik/whoami
dig localhost#54 whoami.example.com
```

Or use the provided cross platform compatible Makefile (linux,macos,windows):
```
# starts container in daemon mode
make
# stops running container
make down
# tail the docker logs
make logs
# starts container with terminal attached
# so you can watch the logs
make up
# start up test whoami container
make test
```

docker-compose.yml
```
version: '2.4'
services:
joyride:
build:
context: .
dockerfile: Dockerfile
image: ilude/joyride
container_name: joyride
image: ghcr.io/ilude/joyride:latest
restart: unless-stopped
environment:
# run the following before docker-compose
# export HOSTIP=$(ip route get 1 | head -1 | awk '{print $7}')
- HOSTIP=${HOSTIP}
ports:
- 54:54/udp
Expand Down

0 comments on commit ae4cb7a

Please sign in to comment.