-
Notifications
You must be signed in to change notification settings - Fork 9
Update Docker Hub #11
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
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
193e3d4
Add Makefile for building & releasing
joshmoore 9eda489
Temporarily remove oracle-jdk8
joshmoore 558a016
Add more tags
joshmoore 9114c92
Move to bootstrapJ8
joshmoore 171d631
Use download strategy
joshmoore b6011dc
Various improvements for openjdk-8
joshmoore d8410ea
Use gitter channel as maintainer (gh-15)
joshmoore 56c8277
Docs and backwards compatibility for entrypoint.sh
joshmoore 6c95d8d
add travis
atarkowska 0e1a5e1
Move to /opt/fiji
joshmoore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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 |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| today = $(shell date +%Y%m%d) | ||
|
|
||
| latest = fiji-openjdk-8 | ||
|
|
||
| images = \ | ||
| $(latest) \ | ||
| fiji-openjdk-7 | ||
|
|
||
| ## Currently broken: | ||
| ## - fiji-oracle-jdk6 | ||
| ## - fiji-openjdk-6 | ||
| ## - fiji-oracle-jdk7 | ||
| ## Propose removal | ||
|
|
||
| ## Must be built on special hardware: | ||
| ## - fiji-oracle-jdk8-arm32v7 | ||
|
|
||
| all : build | ||
|
|
||
| update : | ||
| @for image in $(images); do (cd $${image}; grep FROM Dockerfile | cut -f2 -d" " | xargs docker pull); done | ||
|
|
||
| build: $(images) | ||
|
|
||
| $(images) : %: | ||
| cd $@ && docker build -t fiji/fiji:$@ . | ||
|
|
||
| release : | ||
| for f in $(images); do docker tag fiji/fiji:$${f} fiji/fiji:$${f}.$(today); done | ||
| for f in $(images); do docker push fiji/fiji:$${f}.$(today); done | ||
| for f in $(images); do docker push fiji/fiji:$${f}; done | ||
| docker tag fiji/fiji:$(latest) fiji/fiji:latest; | ||
| docker tag fiji/fiji:$(latest) fiji/fiji:$(today); | ||
| docker push fiji/fiji:latest; | ||
| docker push fiji/fiji:$(today); | ||
|
|
||
| clean : | ||
| @for image in $(images); do echo docker rmi fiji/fiji:$${image}; done | ||
| docker rmi fiji/fiji:latest | ||
|
|
||
| .PHONY: all update build release clean $(images) |
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 |
|---|---|---|
|
|
@@ -8,16 +8,25 @@ FROM openjdk:8 | |
| # Define maintainer. | ||
| MAINTAINER Mark Hiner <[email protected]> | ||
|
|
||
| # Create a user. | ||
| RUN useradd -u 1000 -ms /bin/bash fiji | ||
| USER fiji | ||
|
|
||
| # Define working directory. | ||
| WORKDIR /fiji | ||
| WORKDIR /home/fiji | ||
joshmoore marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| # Install Fiji. | ||
| RUN \ | ||
| curl -O https://update.imagej.net/bootstrap.js && \ | ||
| jrunscript bootstrap.js update-force-pristine | ||
| RUN wget -q https://downloads.imagej.net/fiji/latest/fiji-nojre.zip \ | ||
| && unzip fiji-nojre.zip \ | ||
| && rm fiji-nojre.zip | ||
|
|
||
| # Add fiji to the PATH | ||
| ENV PATH $PATH:/fiji | ||
| ENV PATH $PATH:/home/fiji/Fiji.app | ||
|
|
||
| # Define entrypoint. | ||
| COPY entrypoint.sh /home/fiji | ||
| ENTRYPOINT ["./entrypoint.sh"] | ||
|
|
||
| # Define default command. | ||
| CMD ["fiji-linux64"] | ||
| # Run once to create Java preferences. | ||
| COPY demo.py /home/fiji/ | ||
| RUN ./entrypoint.sh --headless --ij2 --console --run ./demo.py 'name="test"' | ||
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 |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #@String name | ||
| print('Hello ' + name) |
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 |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| #!/bin/bash | ||
|
|
||
| IMAGEJ="ImageJ-linux64 --headless --default-gc" | ||
|
|
||
| set -e | ||
|
|
||
| if [[ $# -eq 0 ]] ; then | ||
| if [ -t 0 ] ; then | ||
| exec bash | ||
| else | ||
| exec $IMAGEJ --help | ||
| fi | ||
| else | ||
| exec $IMAGEJ "$@" | ||
| fi |
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.
you can run container as
--user 1000:1000There 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.
Definitely, but then you can't use
--update add-update-site, etc. can you? Certainly you get a warning from ImageJ warning that the installation is read-only.Uh oh!
There was an error while loading. Please reload this page.
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.
Details:
Uh oh!
There was an error while loading. Please reload this page.
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 don't know what dockerfiles you are building from, but I'm going to guess that in your fiji_base you are using
USER root. That's one thing I got rid of. I very much prefer to not run root-based dockers on my systems.