Skip to content

Commit

Permalink
test: add test case for setcap in Dockerfile
Browse files Browse the repository at this point in the history
This is a followup of #1994. This test runs a Dockerfile where setcap is
executed. Without the fix in #1994, the last command won't generate any
diff and thus is discarded by kaniko and thus should fail this test.
  • Loading branch information
zhouhaibing089 committed May 9, 2022
1 parent 816e6d5 commit 9efdff0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions integration/dockerfiles-with-context/issue-1851/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2022 Google, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM wildwildangel/setcap-static:sha-a5c7425
ADD test-file /usr/bin/test-file
RUN ["/setcap-static", "cap_net_bind_service=+ep", "/usr/bin/test-file"]
Empty file.

0 comments on commit 9efdff0

Please sign in to comment.