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

chore(test): bind mount read only in compose file for testing #2352

Merged
merged 3 commits into from
Mar 30, 2023

Conversation

eitsupi
Copy link
Member

@eitsupi eitsupi commented Mar 30, 2023

#2286 (comment)

It is safer to do bind mounts with read only to prevent file permissions from being changed from the containers.

@eitsupi eitsupi changed the title test: bind mount read only in compose file for testing chore(test): bind mount read only in compose file for testing Mar 30, 2023
@eitsupi
Copy link
Member Author

eitsupi commented Mar 30, 2023

mysql container seems executing chown when start up.

integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/employees.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/invoice_items.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/playlists.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/artists.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/schema.sql': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/invoices.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/media_types.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/tracks.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/genres.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/albums.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/chinook.db': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/playlist_track.csv': Read-only file system
integration-rdbms-mysql-1     | chown: changing ownership of '/tmp/chinook/customers.csv': Read-only file system
integration-rdbms-mysql-1 exited with code 1

@eitsupi eitsupi marked this pull request as ready for review March 30, 2023 14:13
@eitsupi eitsupi merged commit cd1785d into PRQL:main Mar 30, 2023
@eitsupi eitsupi deleted the docker-compose-update branch March 30, 2023 14:17
@max-sixty max-sixty mentioned this pull request Mar 30, 2023
7 tasks
@@ -1,2 +1,2 @@
[mysqld]
secure-file-priv= /tmp/chinook/
secure-file-priv = ""
Copy link
Member

Choose a reason for hiding this comment

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

Low priority question — but does this mean we can remove this file now?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need to set secure-file-priv="" either in the configuration file or in the command.
Perhaps it is more concise to write the command in the compose file, so I changed it in #2359.

max-sixty pushed a commit to max-sixty/prql that referenced this pull request Apr 2, 2023
)

* test: bind mount read only in compose file for testing

* chore: should not chown /tmp/chinook
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.

2 participants