Merge pull request #312 from xoxys/master

add custom seccomp profile
This commit is contained in:
Brad Rydzewski 2021-02-09 16:29:27 -05:00 committed by GitHub
commit 319660d758
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

@ -343,6 +343,10 @@ func commandDaemon(daemon Daemon) *exec.Cmd {
"--host=unix:///var/run/docker.sock",
}
if _, err := os.Stat("/etc/docker/default.json"); err == nil {
args = append(args, "--seccomp-profile=/etc/docker/default.json")
}
if daemon.StorageDriver != "" {
args = append(args, "-s", daemon.StorageDriver)
}

@ -2,5 +2,14 @@ FROM arm32v6/docker:19.03.8-dind
ENV DOCKER_HOST=unix:///var/run/docker.sock
RUN apk --update add --virtual .build-deps curl && \
mkdir -p /etc/docker/ && \
curl -SsL -o /etc/docker/default.json https://raw.githubusercontent.com/moby/moby/19.03/profiles/seccomp/default.json && \
sed -i 's/SCMP_ACT_ERRNO/SCMP_ACT_TRACE/g' /etc/docker/default.json && \
chmod 600 /etc/docker/default.json && \
apk del .build-deps && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
ADD release/linux/arm/drone-docker /bin/
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh", "/bin/drone-docker"]