Skip to content

Commit

Permalink
Dockerized WSF
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Rockwood committed May 6, 2016
1 parent d56d5b6 commit 145d9d4
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM scratch

MAINTAINER Ben Rockwood <benr@cuddletech.com>
ADD bainbridge_wsf wsf

ENTRYPOINT ["/wsf"]
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
all: static

standard:
go build

static:
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-s'

docker: static
docker build -t cuddletech/wsf .

docker-clean:
echo "Deleting cuddletech/wsf Docker Images"
docker rmi -f cuddletech/wsf

clean:
rm -f bainbridge_wsf*
rm -f wsf

clean-all: clean docker-clean


27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,33 @@ Then execute the tool either using _go run wsf.go_ or build and install via _go

No arguments are required for use.

For static compilation, use:

```bash
$ CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags '-s'
```

# Dockerization

To create a docker container of this tool, run _make docker_. The resulting image will be named **cuddletech/wsf**.

Run the container like so:

```bash
$ docker run -it -e WSFAPI=fb2cc927-43e7-XXXXXX-XXXXX-XXXXXXXXXX cuddletech/wsf
Spring 2016
Seattle --> Bainbridge Island
12:30 -- Wenatchee (1)
13:10 -- Tacoma (2)
14:05 -- Wenatchee (1)
14:55 -- Tacoma (2)
15:45 -- Wenatchee (1)
16:35 -- Tacoma (2)
17:40 -- Wenatchee (1)
18:25 -- Tacoma (2)
....
```

# See Also

To learn more about the Washington State Department of Transpertation (WSDOT) and Washington State Ferry (WSF) API's, visit http://www.wsdot.wa.gov/traffic/api/

0 comments on commit 145d9d4

Please sign in to comment.