Skip to content

Commit

Permalink
update instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
reynico committed Oct 15, 2024
1 parent b29dcbe commit 1ece5e6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
25 changes: 23 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
IMAGE_NAME := devsecops-toolset
.DEFAULT_GOAL := help

# Get the latest release tag from git
LATEST_RELEASE := $(shell git describe --tags --abbrev=0)

include .env
BUILD_ARGS := $(foreach VAR,$(shell sed 's/=.*//' .env),--build-arg $(VAR)=$($(VAR)))

all: build
help:
@echo "Usage:"
@echo " make <target>"
@echo ""
@echo "Targets:"
@echo " build Build the Docker image with the software versions described in the .env file"
@echo " release Build the Docker image with the software versions described in the .env file, but from a specific release of this repo"
@echo " latest Build the Docker image with the latest version for each tool"
@echo " exec Run an interactive shell inside the container"
@echo ""
@echo "Examples:"
@echo " make"
@echo " make build"
@echo " make release"
@echo " make latest"
@echo " make exec"
@echo ""

# Build the Docker image using current branch
build:
Expand All @@ -22,4 +39,8 @@ release:
latest:
docker build $(foreach VAR,$(shell sed 's/=.*//' .env),--build-arg $(VAR)=latest) -t $(IMAGE_NAME):latest .

.PHONY: all build release latest
exec: build
@echo "Running interactive shell inside the $(IMAGE_NAME) container..."
@docker run --rm -it -v $(PWD):/workdir $(IMAGE_NAME):latest /bin/bash

.PHONY: help build release latest exec
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ Unified repository with OSS security tools, just `make exec` and dive into the c
There are some tools that have not been integrated to the main container itself, given their nature,
but have been or will be added to the repository with an explanation on how to run them separately.

## Firing up the container (OUTDATED)
## Firing up the container

```bash
% make
Usage:
make <target>

Targets:
build Build the Docker image
build Build the Docker image with the software versions described in the .env file
release Build the Docker image with the software versions described in the .env file, but from a specific release of this repo
latest Build the Docker image with the latest version for each tool
exec Run an interactive shell inside the container
clean Remove the Docker image

Examples:
make
make build
make release
make latest
make exec
make clean
```

## Go to [how to use the tools inside](./HOWTO.md) to understand how each one of them actually work
Expand Down

0 comments on commit 1ece5e6

Please sign in to comment.