Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 123
revert ubuntu based images back to single stage#523
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
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,38 +12,29 @@ | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| FROM websphere-liberty:23.0.0.6-kernel-java8-ibmjava AS installBundle | ||
| FROM websphere-liberty:23.0.0.6-kernel-java8-ibmjava | ||
| USER root | ||
| ARG VERBOSE=false | ||
| ARG REPOSITORIES_PROPERTIES="" | ||
| # If there is a local copy of the repository use that instead | ||
| COPY resources/ /tmp/ | ||
| # Install the base bundle | ||
mbroz2 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| RUN set -eux; \ | ||
| if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ | ||
| mkdir /opt/ibm/wlp/etc/; \ | ||
| echo "$REPOSITORIES_PROPERTIES" > /opt/ibm/wlp/etc/repositories.properties; \ | ||
| installUtility install --acceptLicense baseBundle; \ | ||
| fi; \ | ||
| installUtility install --acceptLicense baseBundle; \ | ||
| if [ ! -z "$REPOSITORIES_PROPERTIES" ]; then \ | ||
| rm /opt/ibm/wlp/etc/repositories.properties; \ | ||
| elif [ -f /tmp/wlpRepo.zip ]; then \ | ||
| installUtility install --acceptLicense baseBundle --from=/tmp/wlpRepo.zip; \ | ||
| else \ | ||
| installUtility install --acceptLicense baseBundle; \ | ||
| fi; \ | ||
| rm -rf /output/workarea /output/logs; \ | ||
| find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw; | ||
| FROM websphere-liberty:23.0.0.6-kernel-java8-ibmjava | ||
| ARG VERBOSE=false | ||
| # Copy the runtime | ||
| COPY --from=installBundle /opt/ibm/wlp /opt/ibm/wlp | ||
| COPY --chown=1001:0 server.xml /config/ | ||
| # Create a new SCC layer | ||
| RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \ | ||
| && rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache \ | ||
| && find /opt/ibm/wlp/output ! -path "*.classCache*" ! -perm -g=rwx -print0 | xargs -0 -r chmod g+rwx | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,32 +12,6 @@ | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| FROM ibmjava:8-jre AS getRuntime | ||
| USER root | ||
| ARG VERBOSE=false | ||
| # Install WebSphere Liberty | ||
| ARG LIBERTY_VERSION=23.0.0.6 | ||
| ARG LIBERTY_URL | ||
| ARG DOWNLOAD_OPTIONS="" | ||
| # If there is a local copy of the image use that instead | ||
| COPY resources/ /tmp/ | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends unzip wget openssl \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && mkdir -p /licenses/ \ | ||
| && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ | ||
| && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ | ||
| && if [ ! -f /tmp/wlp.zip ]; then wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip; fi \ | ||
| && unzip -q /tmp/wlp.zip -d /opt/ibm \ | ||
| && chown -R 1001:0 /opt/ibm/wlp \ | ||
| && chmod -R g+rw /opt/ibm/wlp \ | ||
| && cp -a /opt/ibm/wlp/lafiles/. /licenses/ | ||
| FROM ibmjava:8-jre | ||
| USER root | ||
| @@ -95,20 +69,27 @@ RUN set -eux; \ | ||
| curl -LfsSo /usr/bin/dumb-init ${DUMB_INIT_URL}; \ | ||
| echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \ | ||
| chmod +x /usr/bin/dumb-init; \ | ||
| apt-get purge --auto-remove -y wget; \ | ||
| apt-get purge --auto-remove -y curl; \ | ||
mbroz2 marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| rm -rf /var/lib/apt/lists/*; | ||
| # Add default user 1001 and create wlp with right user/permissions before copying | ||
| RUN useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ | ||
| && mkdir -p /opt/ibm/wlp \ | ||
| && chown -R 1001:0 /opt/ibm/wlp \ | ||
| && chmod -R g+rw /opt/ibm/wlp | ||
| # Copy the runtime and licenses | ||
| COPY --from=getRuntime --chown=1001:0 /opt/ibm/wlp /opt/ibm/wlp | ||
| COPY --from=getRuntime /licenses /licenses | ||
| # Install WebSphere Liberty | ||
| ARG LIBERTY_URL | ||
| ARG DOWNLOAD_OPTIONS="" | ||
| RUN apt-get install -y --no-install-recommends openssl \ | ||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends unzip wget openssl \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| && mkdir -p /licenses/ \ | ||
| && useradd -u 1001 -r -g 0 -s /usr/sbin/nologin default \ | ||
| && LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep -E "^\s*kernel:.*${LIBERTY_VERSION}\.zip" | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \ | ||
| && wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \ | ||
| && unzip -q /tmp/wlp.zip -d /opt/ibm \ | ||
| && rm /tmp/wlp.zip \ | ||
| && chown -R 1001:0 /opt/ibm/wlp \ | ||
| && chmod -R g+rw /opt/ibm/wlp \ | ||
| && cp -a /opt/ibm/wlp/lafiles/. /licenses/ \ | ||
| && apt-get purge --auto-remove -y unzip \ | ||
| && apt-get purge --auto-remove -y wget \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
| # Set Path Shortcuts | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
How did this work before without USER root?
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.
I think that's a question for @leochr, and whether we need it for all the full images, including java8
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.
USER rootshouldn't be used, especially with single-stage Dockerfile as that'll switch the default user of Liberty full image. I believe it was added as part of multi-stage Dockerfiles changes, but I don't think it's needed to perform the operations in the full image.