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)
- Get metafile info from a `watch()` rebuild HOT 2
- removes the backslash "\" when minify option is false HOT 8
- [Sourcemap] Private properties don't get sourcemapped correctly HOT 3
- ENV Secrets accessible from js code in a React + Rails APP. HOT 7
- [Feature] Ability to save charts from Bundle Size Analyzer as svg files
- TypeError: Cannot set property X of #<Object> which has only a getter HOT 2
- Line limit option (lineLimit) breaks code HOT 3
- `esnext` target doesn't transform using declarations but `es2022` does HOT 2
- Default exports not handled correctly when external=true and module is dynamically imported (node16)
- Is there a problem here? does this make sense? HOT 4
- Glob-style imports with partial directory name substitutions
- Option to assign default export to globalName for iife format HOT 3
- Running esbuild under npm explore no longer works HOT 1
- esbuild not work well with package.json has "exports:{"./*": "./*"}" HOT 2
- Allow destructuring for all target environments HOT 1
- re-create package.json with only externalized dependencies
- SyntaxError: The requested module X does not provide an export named Y since code modification HOT 1
- Cross-Platform Development Problem HOT 6
- CSS media query range syntax not downleveled
- Object rest and function scope HOT 4
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.