You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/06/22 14:27:55 UTC

[GitHub] [cloudstack] Niklas-Koch opened a new pull request #5141: Add selection for podman/docker

Niklas-Koch opened a new pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141


   ### Description
   
   This PR gives you the option to choose between podman and docker in the docker.sh script.
   I came up with this idea because Red Hat and the most Red Hat-Distribution does not allow docker anymore. Instead they use podman. 
   Now you can choose between both options while entering a -p for podman or a -d for docker after the ./docker.sh command.
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   This PR
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ********************************************************************************* -->
   <!--- NOTE: AUTOMATATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ********************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### How Has This Been Tested?
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   <!-- see how your change affects other areas of the code, etc. -->
   I tested it on our testenvironment in my company.
   I also tested both options, including the case that you do not choose any option. 
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#issuecomment-882474968


   @Niklas-Koch @j-porsche closing this as #5217 supercedes it. please re-open if I'm mistaking


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#issuecomment-882474968


   @Niklas-Koch @j-porsche closing this as #5217 supercedes it. please re-open if I'm mistaking


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] svenvogel commented on pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
svenvogel commented on pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#issuecomment-869507172


   > @Niklas-Koch
   > for backwards compatibility, can we use docker by default ?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] j-porsche commented on a change in pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
j-porsche commented on a change in pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#discussion_r666880873



##########
File path: ui/docker.sh
##########
@@ -29,5 +29,20 @@ DATE="$(date --iso-8601=seconds)"
 LABEL_DATE="--label \"org.opencontainers.image.created=${DATE}\""
 GIT_REV="$(git rev-parse HEAD)"
 LABEL_GIT_REV="--label \"org.opencontainers.image.revision=${GIT_REV}\""
+USE_PODMAN=0
+USE_DOCKER=0
+OPTIONS='pd'
+while getopts $OPTIONS OPTION
+do
+        case "$OPTION" in
+                p)USE_PODMAN=1;;
+                d)USE_DOCKER=1;;
+                *)echo "Please choose between -p for podman or -d for docker.";;
+        esac
+done
+if [[ $USE_PODMAN -eq 1 ]]; then
+        podman build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG}
+        exit
+fi
+docker build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG}

Review comment:
       @Niklas-Koch You missed the point at the end of the line 47
   
   ```suggestion
   docker build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} .
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] j-porsche commented on a change in pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
j-porsche commented on a change in pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#discussion_r666880784



##########
File path: ui/docker.sh
##########
@@ -29,5 +29,20 @@ DATE="$(date --iso-8601=seconds)"
 LABEL_DATE="--label \"org.opencontainers.image.created=${DATE}\""
 GIT_REV="$(git rev-parse HEAD)"
 LABEL_GIT_REV="--label \"org.opencontainers.image.revision=${GIT_REV}\""
+USE_PODMAN=0
+USE_DOCKER=0
+OPTIONS='pd'
+while getopts $OPTIONS OPTION
+do
+        case "$OPTION" in
+                p)USE_PODMAN=1;;
+                d)USE_DOCKER=1;;
+                *)echo "Please choose between -p for podman or -d for docker.";;
+        esac
+done
+if [[ $USE_PODMAN -eq 1 ]]; then
+        podman build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG}

Review comment:
       @Niklas-Koch You missed the point at the end of the line 44
   ```suggestion
           podman build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} .
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland closed pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
DaanHoogland closed pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland commented on pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
DaanHoogland commented on pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#issuecomment-882474968


   @Niklas-Koch @j-porsche closing this as #5217 supercedes it. please re-open if I'm mistaking


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] svenvogel closed pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
svenvogel closed pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] weizhouapache commented on pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
weizhouapache commented on pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#issuecomment-866040442


   @Niklas-Koch 
   for backwards compatibility, can we use docker by default ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] svenvogel removed a comment on pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
svenvogel removed a comment on pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#issuecomment-869507172


   > @Niklas-Koch
   > for backwards compatibility, can we use docker by default ?
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] Niklas-Koch commented on pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
Niklas-Koch commented on pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#issuecomment-869519089


   @weizhouapache 
   Good idea, 
   So I changed the file, that docker is the default value now, to hold the backwards compatibility. 
   Now you have the possibility to use the script without any options and it will use docker as standard. But you also can you the script with an option like -d for docker (it will use docker the same way as without using the option) or -p for podman. So we have the opportunity to use podman. That means we can use the podman, which is getting more and more used and at the same time, we maintained the backwards compatibility.
   I think it is now looking good to me.
   Can you look through it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland closed pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
DaanHoogland closed pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] j-porsche commented on a change in pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
j-porsche commented on a change in pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141#discussion_r666880784



##########
File path: ui/docker.sh
##########
@@ -29,5 +29,20 @@ DATE="$(date --iso-8601=seconds)"
 LABEL_DATE="--label \"org.opencontainers.image.created=${DATE}\""
 GIT_REV="$(git rev-parse HEAD)"
 LABEL_GIT_REV="--label \"org.opencontainers.image.revision=${GIT_REV}\""
+USE_PODMAN=0
+USE_DOCKER=0
+OPTIONS='pd'
+while getopts $OPTIONS OPTION
+do
+        case "$OPTION" in
+                p)USE_PODMAN=1;;
+                d)USE_DOCKER=1;;
+                *)echo "Please choose between -p for podman or -d for docker.";;
+        esac
+done
+if [[ $USE_PODMAN -eq 1 ]]; then
+        podman build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG}

Review comment:
       @Niklas-Koch You missed the point at the end of the line 47
   ```suggestion
           podman build -t cloudstack-ui ${LABEL_DATE} ${LABEL_GIT_REV} ${LABEL_GIT_TAG} .
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [cloudstack] DaanHoogland closed pull request #5141: Add selection for podman/docker

Posted by GitBox <gi...@apache.org>.
DaanHoogland closed pull request #5141:
URL: https://github.com/apache/cloudstack/pull/5141


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org