Skip to content

add docker files #83

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

Merged
merged 1 commit into from
Feb 17, 2022
Merged

add docker files #83

merged 1 commit into from
Feb 17, 2022

Conversation

saces
Copy link
Contributor

@saces saces commented Feb 12, 2022

simple alpine based docker container with synapse_compress_state and synapse_auto_compressor.

Example:

docker run -it --rm -v /run/postgresql/.s.PGSQL.5432:/run/postgresql/.s.PGSQL.5432 registry.gitlab.com/mb-saces/rust-synapse-compress-state:testing synapse_auto_compressor -p "postgresql://db_user:db_password@%2Frun%2Fpostgresql/synapse" -n 100 -c 500

My work repos lives here: https://gitlab.com/mb-saces/rust-synapse-compress-state

@saces saces requested a review from a team as a code owner February 12, 2022 22:14
@rlywtf
Copy link

rlywtf commented Feb 14, 2022

@saces This Dockerfile builds the binary into a different location than is expected by this project:

This commit makes it a bit different than the existing available image here: https://hub.docker.com/r/devture/rust-synapse-compress-state. It did otherwise build properly for me on my arm64 instance! 🥳

image

I'm going to keep poking around at things to see if I can get things working on my arm64 instance. 😅 Thank you for this PR!

@rlywtf
Copy link

rlywtf commented Feb 14, 2022

I'm going to keep poking around at things to see if I can get things working on my arm64 instance. 😅 Thank you for this PR!

I was able to adjust the final two COPY commands in this PR and then utilize a locally build arm64 docker image with the Ansible+Docker=Matrix project after overriding this variable. 🎉

COPY --from=builder /opt/src/target/debug/synapse_compress_state /synapse-compress-state
COPY --from=builder /opt/src/target/debug/synapse_auto_compressor /synapse-auto-compressor

Copy link
Contributor

@squahtx squahtx left a comment

Choose a reason for hiding this comment

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

Looks good, one question

@squahtx squahtx self-assigned this Feb 16, 2022
@squahtx
Copy link
Contributor

squahtx commented Feb 16, 2022

Signed-off-by: saces <[email protected]>
@rlywtf
Copy link

rlywtf commented Feb 16, 2022

Could a sign-off be added, as per https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off ?

I assume this question is for @saces as the submitter and not me? I'm happy to add mine if you would like it from reviewers as well. 😅

Signed-off-by: @rlywtf [email protected]

Copy link

@rlywtf rlywtf left a comment

Choose a reason for hiding this comment

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

I re-ran my local test build now with these updates. (on an arm64 instance)

> docker build . -t rust-synapse-compress-state | tee -a rust-synapse-compress-state_Dockerfile-build.log
rust-synapse-compress-state_Dockerfile-build.log

@squahtx
Copy link
Contributor

squahtx commented Feb 17, 2022

Could a sign-off be added, as per https://matrix-org.github.io/synapse/latest/development/contributing_guide.html#sign-off ?

I assume this question is for @saces as the submitter and not me?

That was for @saces, yes.

Copy link
Contributor

@squahtx squahtx left a comment

Choose a reason for hiding this comment

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

lgtm!

@squahtx squahtx merged commit 32e43da into matrix-org:main Feb 17, 2022
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.

3 participants