Skip to content

Commit 02c4b99

Browse files
tomerdktoso
authored andcommitted
improve docker security
motivation: more secured ci setup changes: * enable :z selinux flag on bind mounts so we can enable selinux on ci * drop potentially exploitable capabilities from docker-compose
1 parent fcd1d32 commit 02c4b99

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ENV LANGUAGE en_US.UTF-8
1313

1414
# dependencies
1515
RUN apt-get update && apt-get install -y wget
16-
RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools # used by integration tests
16+
RUN apt-get update && apt-get install -y lsof dnsutils netcat-openbsd net-tools curl jq # used by integration tests
1717

1818
# ruby and jazzy for docs generation
1919
RUN apt-get update && apt-get install -y ruby ruby-dev libsqlite3-dev

docker/docker-compose.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ services:
1616
depends_on: [runtime-setup]
1717
volumes:
1818
- ~/.ssh:/root/.ssh
19-
- ..:/code
19+
- ..:/code:z
2020
working_dir: /code
21+
cap_drop:
22+
- CAP_NET_RAW
23+
- CAP_NET_BIND_SERVICE
2124

2225
sanity:
2326
<<: *common

0 commit comments

Comments
 (0)