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

Add cross-build Dockerfile and DockerHub publish action #310

Merged
merged 13 commits into from
Sep 5, 2023

Conversation

reqlez
Copy link
Collaborator

@reqlez reqlez commented Sep 4, 2023

  • Add Dockerfile
  • Add DockerHub publish action.
  • Change rust to 1.71.1 ( GH CI won't even build with old version )

For the current Dockerfile, if people want to mount a directory into the container, we will have to add some documentation to set their "/data" folder mounted inside the container to 9010 UID permissions as this is the UID of oracle-core user inside the container.

ex: on the docker host, run sudo chown -R 9010:9010 oracle_data

An example of using this image with docker compose. User will need to place oracle_config.yaml and pool_config.yaml under the oracle_data folder:

core: image: ergoplatform/oracle-core:latest volumes: - ./oracle_data:/data ports: - "9010:9010" - "9011:9011" environment: - ORACLE_NODE_API_KEY=CHANGE_ME_KEY

I'm also recommending users to set the ports to following to make it easier:
oracle api:9010
oracle monitoring: 9011

@reqlez
Copy link
Collaborator Author

reqlez commented Sep 4, 2023

Now that I'm thinking about it, maybe best to trigger this on:

on:
release:
types: [published]

? @greenhat

Copy link
Member

@greenhat greenhat left a comment

Choose a reason for hiding this comment

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

Looking great! Thank you!
Please add the instructions for the users you mentioned in the PR description as the section in README.md.
Besides that, I'd like to run this action in this PR to test the process. I suggested a way in the comments.

Dockerfile Show resolved Hide resolved
@reqlez
Copy link
Collaborator Author

reqlez commented Sep 4, 2023

Looking great! Thank you! Please add the instructions for the users you mentioned in the PR description as the section in README.md. Besides that, I'd like to run this action in this PR to test the process. I suggested a way in the comments.

Okay, let me work on some quick documentation here.

Temporarily change ergoplatform to greenden for testing
@reqlez
Copy link
Collaborator Author

reqlez commented Sep 4, 2023

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

@greenhat
Copy link
Member

greenhat commented Sep 4, 2023

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

Oops, my bad! I set the secrets, but github does not show them when running actions for external PR for security reasons. Let me check if I can override this.

@reqlez
Copy link
Collaborator Author

reqlez commented Sep 4, 2023

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

Oops, my bad! I set the secrets, but github does not show them when running actions for external PR for security reasons. Let me check if I can override this.

Are you sure that it's not because this is coming from my repo so I have to actually set my DockerHub credentials for this test ?

image

@greenhat
Copy link
Member

greenhat commented Sep 4, 2023

af

@greenhat it's throwing Error: Username and password required near the end there. Are you sure secrets are setup in this repo?

Oops, my bad! I set the secrets, but github does not show them when running actions for external PR for security reasons. Let me check if I can override this.

Are you sure that it's not because this is coming from my repo so I have to actually set my DockerHub credentials for this test ?

Hm, I don't think it would work, but you can try to set the secrets in your fork.

@reqlez
Copy link
Collaborator Author

reqlez commented Sep 4, 2023

You are correct, it does not work. Not only that, but here is what i found:

"you've forked another user's repository and want to contribute workflow changes requiring secrets, the main repo's owner(s) will have to add secrets with the same name. Additionally, secrets aren't used in Pull Requests workflow runs. Hence you'll only see if it's working after the changes have been merged into the repository."

I don't think we can test the final push process until this is all merged. In any case, I will modify this back and add some things to README for now.

@reqlez reqlez requested a review from greenhat September 4, 2023 18:00
Copy link
Member

@greenhat greenhat left a comment

Choose a reason for hiding this comment

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

Looking great! Thank you!

@greenhat greenhat merged commit f59102a into ergoplatform:develop Sep 5, 2023
8 of 9 checks passed
@reqlez reqlez deleted the oracle-core-docker branch September 5, 2023 06:23
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