-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #201 from activecm/dev
Update RITA Official Version to v1.0.0
- Loading branch information
Showing
91 changed files
with
4,860 additions
and
2,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
#RITA runs in Docker! | ||
#However, it needs a little help. | ||
#In order to run rita in Docker, two volume mounts are needed. | ||
#One for logs, and another for the config file. | ||
#Alternatively you may extend this dockerfile and add in these files. | ||
#Make sure your Dockerized RITA config file points to the correct bro log location. | ||
#Additionally, make sure that RITA has access to a MongoDB server. | ||
|
||
#Ex: docker run -it --rm -v /path/to/bro/logs:/logs/:ro -v /path/to/rita/config.yaml:/root/.rita/config.yaml:ro rita import | ||
#RITA works best with docker-compose. Docker-compose lets you set these mounts | ||
#and additionally connect it to MongoDB with ease. | ||
FROM golang:1.8-alpine as rita-builder | ||
RUN apk update && apk upgrade && apk add --no-cache git make ca-certificates wget | ||
FROM golang:1.10-alpine as rita-builder | ||
RUN apk add --no-cache git make ca-certificates wget build-base | ||
RUN wget -q -O /go/bin/dep https://github.com/golang/dep/releases/download/v0.3.2/dep-linux-amd64 && chmod +x /go/bin/dep | ||
WORKDIR /go/src/github.com/ocmdev/rita | ||
WORKDIR /go/src/github.com/activecm/rita | ||
COPY . . | ||
RUN make | ||
|
||
FROM alpine:latest | ||
# Change ARGs with --build-arg to target other architectures | ||
# Produce a self-contained statically linked binary | ||
ARG CGO_ENABLED=0 | ||
# Set the build target architecture and OS | ||
ARG GOARCH=amd64 | ||
ARG GOOS=linux | ||
# Passing arguments in to make result in them being set as | ||
# environment variables for the call to go build | ||
RUN make CGO_ENABLED=$CGO_ENABLED GOARCH=$GOARCH GOOS=$GOOS | ||
|
||
FROM scratch | ||
|
||
# Use WORKDIR to create /var/lib/rita since "mkdir" doesn't exist in scratch | ||
# /var/lib/rita is required for the safebrowsing cache in the default config | ||
WORKDIR /var/lib/rita | ||
|
||
WORKDIR / | ||
COPY --from=rita-builder /go/src/github.com/activecm/rita/etc/rita.yaml /etc/rita/config.yaml | ||
COPY --from=rita-builder /go/src/github.com/activecm/rita/rita /rita | ||
|
||
WORKDIR /root | ||
RUN mkdir .rita | ||
COPY --from=rita-builder /go/src/github.com/ocmdev/rita/rita . | ||
ENTRYPOINT ["./rita"] | ||
ENTRYPOINT ["/rita"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
VERSION := $(shell git describe --always --long --dirty --tags) | ||
VERSION := $(shell git describe --abbrev=0 --tags) | ||
EXACT_VERSION := $(shell git describe --always --long --dirty --tags) | ||
GOPATH := $(GOPATH) | ||
BINARY := rita | ||
|
||
LDFLAGS=-ldflags="-X github.com/ocmdev/rita/config.VERSION=${VERSION}" | ||
LDFLAGS=-ldflags="-X github.com/activecm/rita/config.Version=${VERSION} -X github.com/activecm/rita/config.ExactVersion=${EXACT_VERSION}" | ||
|
||
|
||
default: | ||
dep ensure | ||
go build ${LDFLAGS} | ||
|
||
# Having issues with 'go install' + LDFLAGS using sudo and the | ||
# install script. This is a workaround. | ||
install: | ||
dep ensure | ||
go build ${LDFLAGS} -o ${GOPATH}/bin/${BINARY} | ||
|
Oops, something went wrong.