Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Y
yarascan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ai3
tools
yarascan
Commits
43520607
Commit
43520607
authored
5 years ago
by
ale
Browse files
Options
Downloads
Patches
Plain Diff
Add a Dockerfile
And use it to build images with the CI pipeline.
parent
f8967d41
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+31
-1
31 additions, 1 deletion
.gitlab-ci.yml
Dockerfile
+10
-0
10 additions, 0 deletions
Dockerfile
README.md
+6
-0
6 additions, 0 deletions
README.md
with
47 additions
and
1 deletion
.gitlab-ci.yml
+
31
−
1
View file @
43520607
include
:
"
https://git.autistici.org/ai3/build-deb/raw/master/ci-common.yml"
image
:
docker:latest
stages
:
-
docker_build
-
release
services
:
-
docker:dind
variables
:
IMAGE_TAG
:
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
RELEASE_TAG
:
$CI_REGISTRY_IMAGE:latest
GIT_SUBMODULE_STRATEGY
:
recursive
docker_build
:
stage
:
docker_build
script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
-
docker build --build-arg ci_token=$CI_JOB_TOKEN --pull -t $IMAGE_TAG .
-
docker push $IMAGE_TAG
release
:
stage
:
release
script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.git.autistici.org
-
docker pull $IMAGE_TAG
-
docker tag $IMAGE_TAG $RELEASE_TAG
-
docker push $RELEASE_TAG
only
:
-
master
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
10
−
0
View file @
43520607
FROM
debian:buster
AS
build
RUN
apt-get
-q
update
&&
env
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
--no-install-recommends
build-essential libyara-dev pkg-config golang-go
ADD
. /go/src/git.autistici.org/ai3/tools/yarascan
WORKDIR
/go/src/git.autistici.org/ai3/tools/yarascan
RUN
env
GOPATH
=
/go go build
-o
/yarascan ./cmd/yarascan
&&
strip /yarascan
FROM
debian:buster
RUN
apt-get
-q
update
&&
env
DEBIAN_FRONTEND
=
noninteractive apt-get
install
-y
--no-install-recommends
libyara3
COPY
--from=build /yarascan /usr/bin/yarascan
This diff is collapsed.
Click to expand it.
README.md
+
6
−
0
View file @
43520607
...
@@ -19,6 +19,12 @@ $ go install git.autistici.org/ai3/tools/yarascan/cmd/yarascan
...
@@ -19,6 +19,12 @@ $ go install git.autistici.org/ai3/tools/yarascan/cmd/yarascan
which will install the
*yarascan*
binary in
*$GOPATH/bin*
.
which will install the
*yarascan*
binary in
*$GOPATH/bin*
.
## Packages
The
*yarascan*
tool can be packaged either as a Debian package (it
requires at least
*buster*
to build), or as a Docker image. This is
due to the libyara3 dependency.
# Usage
# Usage
The
*yarascan*
utility supports a few different commands. The most
The
*yarascan*
utility supports a few different commands. The most
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment