Files
swift-crypto/docker/docker-compose.yaml
T
tomer doron bfb37dfb92 improve docker security (#6)
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
2020-01-31 09:32:14 +00:00

40 lines
940 B
YAML

# this file is not designed to be run directly
# instead, use the docker-compose.<os>.<swift> files
# eg docker-compose -f docker/docker-compose.yaml -f docker/docker-compose.1804.51.yaml run test
version: "3"
services:
runtime-setup:
image: swift-crypto:default
build:
context: .
dockerfile: Dockerfile
common: &common
image: swift-crypto:default
depends_on: [runtime-setup]
volumes:
- ~/.ssh:/root/.ssh
- ..:/code:z
working_dir: /code
cap_drop:
- CAP_NET_RAW
- CAP_NET_BIND_SERVICE
sanity:
<<: *common
command: /bin/bash -xcl "./scripts/sanity.sh"
test:
<<: *common
# FIXME: get rid of existing warnings
#command: /bin/bash -xcl "swift test --enable-test-discovery -Xswiftc -warnings-as-errors $${SANITIZER_ARG-}"
command: /bin/bash -xcl "swift test --enable-test-discovery"
# util
shell:
<<: *common
entrypoint: /bin/bash