jet

command module
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2023 License: BSD-3-Clause Imports: 2 Imported by: 0

README

Jet

Build Status Go.Dev Reference Release

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.

Language Support

Jet will detect your app from the following languages and package managers:

Comparison Table

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

Installation

Jet is supported on MacOS, Linux and Windows as a standalone binary. You can download the latest binary from the releases page on GitHub.

MacOS

You can install with Homebrew:

brew install lade-io/tap/jet
Linux

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

Build From Source

You can build from source with Go:

go get github.com/lade-io/jet

Examples

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}"]

Credits

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL