Comments (6)
I'm only using npm as a distribution mechanism. There's nothing about nodejs that's inherently necessary to run esbuild. For example, this is all it takes to get an esbuild binary on Linux:
$ curl -O https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.0.9.tgz
$ tar xf ./esbuild-linux-64-0.0.9.tgz
$ file ./package/bin/esbuild
package/bin/esbuild: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
$ ./package/bin/esbuild
Usage:
esbuild [options] [entry points]
...
Given that it's this simple, it seems like overkill to me to use docker just to run esbuild. It also seems pretty simple to use these commands to create a docker image if you do need one, so it doesn't seem necessary to me to have an official docker image. That said, I don't use docker myself, so I could be misunderstanding something.
from esbuild.
And what about the CI/CD servers? We need to install nodejs and npm instead of docker? Please think about docker container again. It has many many advantage. This is an important aspect in my devops hat.
from esbuild.
Thanks for the idea. However, I am planning to solve this problem by instead making a single npm package for all platforms with a post install script that automatically downloads the correct binary (see #32).
from esbuild.
@evanw I think the underlying issue will be that a lot of corporate CI systems are locked down to the Internet so using npm install
or yarn install
will fail. Additionally, corporate ITSEC might need to be, ahem, persuaded, to allow a foreign binary into, say, an Artifactory server.
One of our product teams is evaluating this for their product to see how/if it's viable. If it is, either us building a Docker image wrapping this or having the ability to build eslint locally the first time prior to use in a CI environment would be very useful.
If you don't want to mess with supporting the latter (and I'm still going through the existing issues so I don't know if you've already addressed this use-case elsewhere), I'm happy to investigate the Docker route if we decide that we want to use this internally and share that if it's useful.
Thoughts?
from esbuild.
Running esbuild using Docker should work fine. I haven't tried it myself but I don't see why it wouldn't work. I don't intend for this to be the distribution method for esbuild but it should be trivial to do this yourself if you need it.
The instructions for installing a binary without needing to install node or npm are in my previous post. If you want to build from source because you don't trust the binary, you could do this:
$ git clone --depth 1 --branch v0.0.0 https://github.com/evanw/esbuild.git
$ cd esbuild
$ go build "-ldflags=-s -w" ./cmd/esbuild
except you would replace 0.0.0
with the version of esbuild you intend to build. These commands result in an executable file called ./esbuild
in the current working directory.
from esbuild.
Agreed. We run all our Ansible and Helm stuff from containers to keep the versions stable and not have to deal with all the inherent versioning issues on dev computers. A dev on one of our app teams is currently evaluating this. I think Docker will be the way we decide to go if we decide to switch away from Webpack. Thanks again.
from esbuild.
Related Issues (20)
- idea: bundle embed or static file inside a single file. HOT 3
- Source maps containing `https://` urls get mangled
- Please give me tips how to solve router plain javascript app HOT 2
- How to get final version of build.initialOptions inside a plugin? HOT 2
- Basic question: where is the code that interacts with Nodejs workers? HOT 2
- How to add success log to watch ? HOT 2
- Bundling with HTML HOT 3
- How to build for adobe jsx? HOT 2
- CSS transforms can break nested selectors HOT 3
- Feature Request: Allow absolute paths for resolved chunks HOT 3
- Dynamic import issue when using react hook useEffect inside a remote component HOT 4
- Track which entryfile changed
- Glob pattern for `copy` file loader HOT 2
- Forcing node_modules resolution with the `resolve` function HOT 2
- punycode should be 'external' but bundled ? HOT 2
- Control module bundle dividers HOT 2
- [ERROR] Unexpected end of file in JSON ../jsconfig.json:18:0 - File does not exist in project and node_modules HOT 1
- `OnLoad` in custom plugin is called for disabled modules
- Specifying where compiled CSS files stored
- Assigning to the variable `name` doesnโt work when bundling to ESM output HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esbuild.