
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
shipwright
Advanced tools
Shipwright builds shared Docker images within a git repository in the right order and publishes them tagged with git's revision/branch information so you'll never loose track of an image's origin.
It's the perfect tool for building and publishing your images to places
like Docker Hub or your own private registry. Have a look at our motivation <docs/motivation.md>__ to see why we built it and the pain
points it solves for you.
Shipwright is a simple python script you can install with pip
::
$ pip install shipwright
Once installed, simply change to a project of yours that contains multiple Dockerfiles and is in git.
Add a json formatted file named .shipwright.json to the root
directory of your project. At minimum it should contain the version
number of your Shipwright config and a namespace which is either
your docker hub user name or the URL to your private repository.
1.0 is the current version for the config.
.. code:: json
{
"version": 1.0,
"namespace": "[your docker hub name or private repository]"
}
Additionally your config file can map directory names to alternative
docker repositories. For example here is a .shipwright.json for the
docker hub user shipwright that also maps the root of the git
repository to the docker image shipwright/shared and the /foo
directory to shipwright/awesome_sauce.
.. code:: json
{
"version": 1.0,
"namespace": "shipwright",
"names": {
"/": "shipwright/shared",
"/foo": "shipwright/awesome_sauce"
}
Now you can build all the docker images in the git repo by simply changing to any directory under your git repo and running:
::
$ shipwright
This will recurse through all the directories, looking for ones that
contain a Dockerfile. Shipwright will build these Dockerfiles in order
and by default tag them with <namespace>/<dirname>:<git commit>
along with <namespace>/<dirname>:<git branch> and
<namespace>/<dirname>:latest
We have a sample shipwright project <https://github.com/6si/shipwright-sample>__ you can use if you
want to try this out right away.
.. code:: bash
$ git clone https://github.com/6si/shipwright-sample.git
$ cd shipwright-sample
$ shipwright
NOTE: you can use any username you'd like while building locally. In
the above example we use shipwright. Nothing is published unless you
use the push command. For your own projects, substitute
shipwright in the above example with your (or your organizations)
official docker hub username or private repository.
Notice that if you run the shipwright a second time it will return
immediately without doing anything. Shipwright is smart enough to know
nothing has changed.
Shipwright really shines when you switch git branches.
.. code:: bash
$ git checkout new_feature
$ shipwright
Notice that shipwright only rebuilt the shared library and service1,
ignoring the other projects because they have a common git ancestry.
Running docker images however shows that all the images in the git
repository have been tagged with the latest git revision, branch and
latest.
In fact, as Shipwright builds images it rewrites the Dockerfiles so that they require the base images with tags from the current git revision. This ensures that the entire build is deterministic and reproducible.
By default, if you run shipwright with no arguments, it will build all
Dockerfiles in your git repo. You can specify one or more specifiers
to select fewer images to build. For example you can build a single
images and its dependencies by simply specifying its name on the command
line.
::
$ shipwright <namespace>/some_image
Run `shipwright --help' for more examples of specifiers and their uses.
With one command Shipwright can build your images and push them to a remote repository.
::
$ shipwright push
If you like you can just push your latest images without building.
::
$ shipwright push --no-build
The same specifiers for building also work with push. You might use
this to build an entire tree in one step then push a specific image like
so.
::
$ shipwright build
$ shipwright push -e <namespace>/public_image
Issue #103 <https://github.com/6si/shipwright/pull/103>_).Issue #104 <https://github.com/6si/shipwright/pull/104>_).Issue #102 <https://github.com/6si/shipwright/pull/102>_).Issue #101 <https://github.com/6si/shipwright/pull/101>_).Issue #98 <https://github.com/6si/shipwright/pull/98>_).Issue #93 <https://github.com/6si/shipwright/pull/93>_).Issue #96 <https://github.com/6si/shipwright/pull/96>_).Issue #99 <https://github.com/6si/shipwright/pull/99>_).Issue #100 <https://github.com/6si/shipwright/pull/100>_).Issue #91 <https://github.com/6si/shipwright/pull/91>_).Issue #89 <https://github.com/6si/shipwright/pull/89>_).Issue #88 <https://github.com/6si/shipwright/pull/88>_).Issue #82 <https://github.com/6si/shipwright/pull/82>_).Issue #81 <https://github.com/6si/shipwright/pull/81>_).Issue #80 <https://github.com/6si/shipwright/pull/80>_).Issue #49 <https://github.com/6si/shipwright/issues/49>_).Issue #74 <https://github.com/6si/shipwright/pull/74>).
Thanks James Pickering <https://github.com/jamespic>!Issue #77 <https://github.com/6si/shipwright/issues/77>).
Thanks kgpayne <https://github.com/kgpayne>!Issue #71 <https://github.com/6si/shipwright/pull/71>_)Issue #72 <https://github.com/6si/shipwright/pull/72>_)Issue #70 <https://github.com/6si/shipwright/pull/70>_)Issue #63 <https://github.com/6si/shipwright/pull/63>_)tls when communicating with docker over a unix
socket.assert_hostname as an option to .shipwright.json--x-assert-hostname to disable hostname
checking when TLS is used. Useful for boot2dockershipwright push and shipwright purge-u, -d, -e and -x.shipwright.jsonFAQs
The right way to build, tag and ship shared Docker images.
We found that shipwright demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.