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

Change parent image to openjdk #8

Merged
merged 2 commits into from
Jun 21, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM cantara/alpine-zulu-jdk8
FROM openjdk:8-jdk-alpine
MAINTAINER OpenZipkin "http://zipkin.io/"

# Remove 40M worth of SDK things, but link back /usr/local/java/bin to help tools
Copy link
Member

Choose a reason for hiding this comment

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

If I'm reading things correctly, it looks like this comment needs to be updated as this Dockerfile no longer does the part "link back /usr/local/java/bin to help tools that auto-detect JAVA_HOME." Is that not needed anymore because of a difference in the openjdk image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if I build with the symbolic link it cannot find /usr/local/java/bin:

docker build -t docker-jre:openjdk .
Sending build context to Docker daemon  25.75MB
Step 1/6 : FROM openjdk:8-jdk-alpine
 ---> e0f8c4b438bc
Step 2/6 : MAINTAINER OpenZipkin "http://zipkin.io/"
 ---> Running in 77edaa4e1e78
Removing intermediate container 77edaa4e1e78
 ---> b3804f3bdcb9
Step 3/6 : RUN rm -rf /usr/local/java/bin /usr/local/java/lib /usr/local/java/include
 ---> Running in 69dc7af5363a
Removing intermediate container 69dc7af5363a
 ---> 28ff40e469e9
Step 4/6 : RUN apk add --update --no-cache curl
 ---> Running in 1ceca5159f3c
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/s390x/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/s390x/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/s390x/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/s390x/APKINDEX.tar.gz
(1/3) Installing libssh2 (1.8.0-r2)
(2/3) Installing libcurl (7.60.0-r1)
(3/3) Installing curl (7.60.0-r1)
Executing busybox-1.27.2-r6.trigger
OK: 99 MiB in 54 packages
Removing intermediate container 1ceca5159f3c
 ---> 01a9670d7b1b
Step 5/6 : RUN ln -s /usr/local/java/jre/bin /usr/local/java/bin
 ---> Running in 58aa2493ae4d
ln: /usr/local/java/bin: No such file or directory
The command '/bin/sh -c ln -s /usr/local/java/jre/bin /usr/local/java/bin' returned a non-zero code: 1

About the docker-squash command, it is now possible to build a squashed image by directly using docker build --squash with the experimental flag set.

# that auto-detect JAVA_HOME.
RUN rm -rf /usr/local/java/bin /usr/local/java/lib /usr/local/java/include
# Having the rm and the ln in the same FS layer confuses docker squash
RUN ln -s /usr/local/java/jre/bin /usr/local/java/bin

# Setup curl for convenience as all derivative images use it, and putting
# it in one layer (via squash) is helpful
Expand Down