Updating versions - nodejs/docker-iojs GitHub Wiki

HOWTO: Updating the Docker image when a new io.js version is released

  1. Update branches

    (if only the PATCH SemVer number has changed, skip this step)

    When there is a change to the MAJOR or MINOR SemVer numbers, we must create a new version branch. To do this, just copy the latest branch directory (e.g. 1.0/) under a new name (e.g. 1.1/):

     cp -r 1.0 1.1
    

    Then, update the aliases mapping in generate-stackbrew-library.sh, e.g:

     declare -A aliases
     aliases=(
             [1.1]='1 latest'
     )
    

    Also, here you can delete any branch directories which are now too old to be supported. (Q: Do we have a deprecation policy?)

  2. Update version

    We have a script - update.sh, which automates this step. It will fetch the available released versions from https://iojs.org/dist/ and update the version numbers in the specified branch(es) (for example, replacing occurences of 1.0.3 with 1.0.4 in the proper places):

     ./update.sh 1.0
    
  3. Test

    Review the changes manually, and perform simple tests to make sure nothing obvious was broken. Example:

     IOJS_TEST_VERSION=1.0.4
     cd 1.0/
     sudo docker build -t iojs:${IOJS_TEST_VERSION} .
     sudo docker build -t iojs:${IOJS_TEST_VERSION}-onbuild ./onbuild/
     sudo docker build -t iojs:${IOJS_TEST_VERSION}-slim ./slim/
     sudo docker run --rm -it iojs:${IOJS_TEST_VERSION} iojs --version
     sudo docker run --rm -it iojs:${IOJS_TEST_VERSION}-onbuild iojs --version
     sudo docker run --rm -it iojs:${IOJS_TEST_VERSION}-slim iojs --version
     sudo docker rmi iojs:${IOJS_TEST_VERSION}-slim iojs:${IOJS_TEST_VERSION}-onbuild iojs:${IOJS_TEST_VERSION}
     cd ../
    
  4. Commit & create pull request (merge it right away if you are a collabolator)

  5. Update docker library (after the PR from the previous step has been merged)

    We have a script to help with that too, generate-stackbrew-library.sh. Assuming you have a fork of docker-library/official-images cloned as a sibling to this repository:

     ./generate-stackbrew-library.sh > ../official-images/library/iojs 
    

    ...and send the changes to docker-library/official-images as a PR.