Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dockerfile permissions and add .dockerignore #1504

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thaJeztah
Copy link
Contributor

Dockerfile: fix permissions, use "notary" as default user

Before this, running the circle-ci integration tests showed some failures:

pkcs11 import was not found anywhere without a build tag, yay
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
lstat cmd/notary/tuf/gun: permission denied
lstat cmd/notary/tuf/gun: permission denied

With this patch applied, the tests run without issues.

This patch modifies the circle-ci script accordingly, and makes a small
convenience change when running the tests locally; adding -it allows
for the containers to be terminated (CTRL-C), which was not possible
previously.

Add .dockerignore to ignore build and test artefacts

Ignore files that are unlikely needed in the dockerfile

@thaJeztah thaJeztah force-pushed the fix_dockerfile_permissions branch from 8c38523 to 47c05e2 Compare October 16, 2019 12:24
@@ -0,0 +1,16 @@
.cover
.dockerignore
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed .git, as it's used by the server.Dockerfile to generate the version output. We could consider doing that outside of the container, but that may complicate building the Dockerfile (e.g. through docker hub autobuild)

@thaJeztah thaJeztah force-pushed the fix_dockerfile_permissions branch 3 times, most recently from fbbd022 to 100b8b8 Compare October 22, 2019 21:33
@thaJeztah thaJeztah force-pushed the fix_dockerfile_permissions branch from 100b8b8 to 55d2bff Compare April 7, 2020 14:44
Before this, running the circle-ci integration tests showed some failures:

```
pkcs11 import was not found anywhere without a build tag, yay
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
find: './cmd/notary/tuf/gun': Permission denied
lstat cmd/notary/tuf/gun: permission denied
lstat cmd/notary/tuf/gun: permission denied
```

With this patch applied, the tests run without issues.

This patch modifies the circle-ci script accordingly, and makes a small
convenience change when running the tests locally; adding `-it` allows
for the containers to be terminated (CTRL-C), which was not possible
previously.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the fix_dockerfile_permissions branch from 55d2bff to 1e3ec89 Compare March 12, 2021 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant