[KEYCLOAK-5482] Change xslt transformations to jboss-cli commands #85
Conversation
baztan106483
commented
Sep 20, 2017
- No change in behavior
- List of changes:
- https://gist.github.com/baztan106483/e67989b15f6429228310ca79bc0110df
… process. It downloads last Keycloak version, applies the changes in standalone and compares the original files with the new files.
server-mysql/Dockerfile
Outdated
RUN /opt/jboss/keycloak/bin/jboss-cli.sh --file=/opt/jboss/keycloak/change-database.txt; \ | ||
sed -i -e 's/standalone/standalone-ha/' /opt/jboss/keycloak/change-database.txt; \ | ||
/opt/jboss/keycloak/bin/jboss-cli.sh --file=/opt/jboss/keycloak/change-database.txt; | ||
RUN rm -rf /opt/jboss/keycloak/standalone/configuration/standalone_xml_history/current/*; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a best practice to merge RUN
s to avoid adding extra layers if possible. Second run will shade out files but they will still be present on fs layer from previous run.
New docker versions have support for COPY --from=...
for multi-stage builds but I'm not sure if DockerHub has support for this feature yet, it was only presented on DockerCon'17.
Disclaimer: I'm not a Keycloak developer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Konstantin, we will consider your advices,
Greetings
server-postgres/Dockerfile
Outdated
sed -i -e 's/standalone/standalone-ha/' /opt/jboss/keycloak/change-database.txt; \ | ||
/opt/jboss/keycloak/bin/jboss-cli.sh --file=/opt/jboss/keycloak/change-database.txt; | ||
|
||
RUN rm -rf /opt/jboss/keycloak/standalone/configuration/standalone_xml_history/current/*; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
@baztan106483, thanks. Let's wait for review from Keycloak devs |
Thanks for the PR. We just merged support for MySQL and PostgreSQL directly in the main server image so I've sent a new PR with this work that is refactored to work with those changes. #87 |
Closing - merged as part of #87 |