Skip to content

Commit 985908c

Browse files
committed
Added docker build and dockerhub links
1 parent d4604a2 commit 985908c

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,22 @@ Notes:
463463
considerable effort. We do not intend to maintain a stable build at this
464464
time.
465465

466+
Docker
467+
-------
468+
469+
It is possible to build and use EffectiveSan over a docker container.
470+
For this, follow the steps below:
471+
472+
$ cd docker
473+
$ make
474+
475+
This should set up a docker image as "effective-san:latest".
476+
477+
Alternatively, a prebuilt docker image is available on Dockerhub and can be pulled locally as:
478+
479+
$ docker pull sdphaye/effective-san
480+
481+
466482
Features
467483
========
468484

docker/Dockerfile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Use Ubuntu 16.04 as the base image
2+
FROM ubuntu:16.04
3+
4+
# Set environment variables to avoid interactive prompts during installation
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
# Update and install required packages
8+
RUN apt-get update && \
9+
apt-get install -y \
10+
git \
11+
vim \
12+
wget \
13+
unzip \
14+
build-essential \
15+
cmake \
16+
python3 \
17+
zlib1g-dev \
18+
llvm-4.0 \
19+
clang-4.0 && \
20+
# Clean up apt cache to reduce image size
21+
apt-get clean && \
22+
rm -rf /var/lib/apt/lists/*
23+
24+
# Clone the EffectiveSan repository
25+
RUN cd /home && \
26+
git clone https://github.com/GJDuck/EffectiveSan.git
27+
28+
# Build the EffectiveSan project
29+
RUN cd /home/EffectiveSan && \
30+
./build.sh
31+
32+
# Set default working directory
33+
WORKDIR /home/EffectiveSan
34+

docker/Makefile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Variables
2+
IMAGE_NAME=effective-san
3+
TAG=latest
4+
5+
# Default target (run when `make` is invoked)
6+
all: build
7+
8+
# Rule to build the Docker image
9+
build:
10+
docker build -t $(IMAGE_NAME):$(TAG) .
11+
12+
# Rule to clean up (optional)
13+
clean:
14+
docker rmi $(IMAGE_NAME):$(TAG)
15+
16+
# Rule to push the Docker image to a registry (optional)
17+
push:
18+
docker push $(IMAGE_NAME):$(TAG)
19+

0 commit comments

Comments
 (0)