og-task-template

command module
v0.0.0-...-0d134f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

README

Tasks Template

Define a Task Image for Run by Opensecurity Platform. User Can Define a Task Image and Run it on Opencomply Platform. You can fork this repository and create your own task image.

Task Definition

Task is a set of instructions that can be executed by Opensecurity Platform. It should be run once every time it is executed. And have an output that can be written to a file.

Defining a task has one main parts:

1. Code

First part is the code that will be executed. It can be a shell script, python script, or any other executable file. We Use task.sh as an example.

#!/bin/bash
echo "Hello World"
echo "This is an example task"
2. Build Image

Second part is the Dockerfile that will be used to build the task image. You can use any base image you want, but it should have the necessary tools to run the go code. Also If you want you can install additional tools or libraries.

# Do not change the code below
# Run The Sender Go Application
FROM golang:1.23-alpine 
# Copy the source code
COPY . .
# Download the dependencies
RUN cd sender && go mod download -x
# Build the Go application
RUN cd sender &&   go build -o task .

ENTRYPOINT ["./sender/task"]

We use Dockerfile for Building Image.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL