Jet is a tool to convert source code into Docker images. Jet inspects your source code to create a Dockerfile with caching layers and any required system dependencies.
Jet will detect your app from the following languages and package managers:
- Go - dep, glide, godep, go modules, govendor
- Node.js - npm, yarn
- PHP - composer
- Python - conda, pip, pipenv
- Ruby - bundler
Feature | Jet | Cloud Native Buildpacks | Repo2docker | Source-to-Image |
---|---|---|---|---|
Supported Languages | Go, Node.js, PHP, Python, Ruby | Java, Node.js | Python | Node.js, Perl, PHP, Python, Ruby |
Best Practices Dockerfile | ✅ | ❌ | ✅ | ❌ |
Hourly Runtime Updates | ✅ | ❌ | ❌ | ❌ |
Jet is supported on MacOS, Linux and Windows as a standalone binary. You can download the latest binary from the releases page on GitHub.
You can install with Homebrew:
brew install lade-io/tap/jet
You can download the latest tarball, extract and move to your $PATH
:
curl -L https://github.com/lade-io/jet/releases/latest/download/jet-linux-amd64.tar.gz | tar xz
sudo mv jet /usr/local/bin
You can build from source with Go:
go get github.com/lade-io/jet
Build Node.js app:
$ jet build testdata/node/node12/ -n node-app
$ docker run -p 5000:5000 node-app
Debug Node.js app:
$ jet debug testdata/node/node12/
FROM node:12
ENV PATH=/home/node/app/node_modules/.bin:$PATH
USER node
RUN mkdir -p /home/node/app/
WORKDIR /home/node/app/
COPY --chown=node:node package.json package-lock.json ./
RUN npm ci
COPY --chown=node:node . ./
CMD ["node", "server.js"]
Debug Python and Django app:
$ jet debug testdata/python/django/
FROM python:3.9
ENV PATH=/home/web/.local/bin:$PATH
RUN groupadd --gid 1000 web \
&& useradd --uid 1000 --gid web --shell /bin/bash --create-home web
USER web
RUN mkdir -p /home/web/app/
WORKDIR /home/web/app/
COPY --chown=web:web requirements.txt ./
RUN pip install -r requirements.txt
COPY --chown=web:web . ./
CMD ["gunicorn", "django_web_app.wsgi:application"]
Debug Ruby on Rails app:
$ jet debug testdata/ruby/rails5/
FROM ruby:2.7.7
RUN wget -qO node.tar.gz "https://nodejs.org/dist/v18.13.0/node-v18.13.0-linux-x64.tar.gz" \
&& tar -xzf node.tar.gz -C /usr/local --strip-components=1 \
&& rm node.tar.gz
RUN corepack enable
RUN groupadd --gid 1000 web \
&& useradd --uid 1000 --gid web --shell /bin/bash --create-home web
USER web
RUN mkdir -p /home/web/app/
WORKDIR /home/web/app/
COPY --chown=web:web Gemfile Gemfile.lock ./
RUN bundle install
COPY --chown=web:web package.json yarn.lock ./
RUN yarn install
COPY --chown=web:web . ./
CMD ["sh", "-c", "puma -p ${PORT-3000}"]
- Test cases imported from Cloud Foundry Buildpacks licensed under Apache License 2.0