Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
Add Dockerfile (#130)
Browse files Browse the repository at this point in the history
This relates to a question brought up in #109. I went ahead and added a Dockerfile for executing the build in Ubuntu as a demonstration of this need for a dependency.
  • Loading branch information
eculver authored and nickatsegment committed Mar 7, 2019
1 parent cb068e5 commit a5f7c68
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from golang:1.11 as build

ENV SRC github.com/segmentio/aws-okta
ARG VERSION

WORKDIR /build
COPY . /go/src/${SRC}

RUN apt-get update
RUN apt-get install --no-install-recommends -y \
libusb-1.0-0-dev \
ca-certificates \
build-essential \
git

RUN CGO_ENABLED=1 go build -o aws-okta -ldflags="-X main.version=$VERSION" ${SRC}/cmd

FROM scratch
COPY --from=build /build/aws-okta /
ENTRYPOINT ["/aws-okta"]

8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ For Linux / Ubuntu add the following to your bash config / zshrc etc:
export AWS_OKTA_BACKEND=secret-service
```

## Local Development

If you're developing in Linux, you'll need to get `libusb`. For Ubuntu, install the libusb-1.0-0-dev or use the `Dockerfile` provided in the repo.

## Running Tests

`make test`

## Releasing

Pushing a new tag will cause Circle to automatically create and push a linux release. After this is done, you should run (from a mac):
Expand Down

0 comments on commit a5f7c68

Please sign in to comment.