Skip to content

Commit

Permalink
fix seccomp:unconfined
Browse files Browse the repository at this point in the history
There may be a better more general solution, but this fixes
`seccomp:unconfined`

Fixes #199
  • Loading branch information
markstos committed Jun 22, 2020
1 parent 294f8ee commit af83276
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,9 @@ def normalize_service(service):
for key in ("env_file", "security_opt"):
if key not in service: continue
if is_str(service[key]): service[key]=[service[key]]
for i in range(len(service[key])):
if service[key][i] == 'seccomp:unconfined':
service[key][i] = 'seccomp=unconfined'
for key in ("environment", "labels"):
if key not in service: continue
service[key] = norm_as_dict(service[key])
Expand Down
3 changes: 3 additions & 0 deletions tests/seccomp/context/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM busybox
RUN mkdir -p /var/www/html/ && date -Iseconds > /var/www/html/index.txt
CMD ["busybox", "httpd", "-f", "-p", "80", "-h", "/var/www/html"]
10 changes: 10 additions & 0 deletions tests/seccomp/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"
services:
web1:
build: ./context
image: my-busybox-httpd
ports:
- "8080:80"
command: env
security_opt:
- seccomp:unconfined

0 comments on commit af83276

Please sign in to comment.