New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

build-front-container

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-front-container

[![Build Status](https://travis-ci.org/alfa-bank-dev/build-front-container.svg?branch=master)](https://travis-ci.org/alfa-bank-dev/build-front-container)

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17
increased by1600%
Maintainers
1
Weekly downloads
 
Created
Source

Build front container module

Build Status

Warning! build project inside container works very slow with docker-machine on Mac.

The main goal of this project is to uniform the process of building web applications. We heavily use Docker in our build process. We can divide the build process into two stages:

  • create all the required artifacts. Mainly, they're some JS and CSS bundles, images, etc.
  • build Docker image using the artifacts from the previous step

We recommend creating artifacts in the specially prepared docker-container. Although, you can build you artifacts on the host, but building project inside container has some benefits:

  • your project created in the suitable environment. So the versions of tools are correct - node.js, npm and friends.
  • sometimes it's not possible to get the right tools on the CI-server

The first stage requires build.sh script. You can use already prepared scripts(see ./build-scripts) or you can put your own one. So this bash script will run inside docker container and in the end, we'll get some files.

Then we need to put these files into container. For this purpose, two archives create:

  • app.tar.gz - application files
  • public-modules.tar.gz - for npm-deps

And then just put them inside the image(see Dockerfile).

It's better not to add the build-front-container module to the package.json as a dependency. But install it manually before build.

Options

See output from

./node_modules/.bin/build-front-container --help

How to use

Add command to your npm-scripts. E.g.:

$ grep scripts -A 1 package.json
  "scripts": {
    "build-front-container": "build-front-container",

By default all artifacts will be put into .build directory. It's also possible to specify output directory. E.g.:

$ grep scripts -A 1 package.json
  "scripts": {
    "build-front-container": "build-front-container --output-dir .build-xxx",

You can specify what build script to use for building project. E.g.:

$ grep scripts -A 1 package.json
  "scripts": {
    "build-front-container": "build-front-container --build-script-path ./build.sh"

You can choose one of predefined build scripts. E.g.:

$ grep scripts -A 1 package.json
  "scripts": {
    "build-front-container": "build-front-container --project-type webpack"

FAQs

Package last updated on 01 Jul 2016

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc