Comments (10)
Do you have a lockfile? If not, please generate one with npm i
.
from nixpacks.
doesn't the example node project already have a lockfile. also, this command worked when run on my Mac.
from nixpacks.
this is what the example project has
gitpod /workspace/nixpacks (main) $ ls examples/node
index.js package.json package-lock.json
from nixpacks.
Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
Looks like there was trouble starting a thread in V8. I don't know why that would be, though, unless Gitpod has a limit on running threads (?), which I can't find mention of in their pricing.
from nixpacks.
Looks like there was trouble starting a thread in V8. I don't know why that would be, though, unless Gitpod has a limit on running threads (?), which I can't find mention of in their pricing.
Building the generated Dockerfile
fails too.
Generated Dockerfile for node-main-file example
FROM debian:bullseye-slim
RUN apt-get update && apt-get -y upgrade \
&& apt-get install --no-install-recommends -y locales curl xz-utils ca-certificates openssl \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& mkdir -m 0755 /nix && mkdir -m 0755 /etc/nix && groupadd -r nixbld && chown root /nix \
&& echo 'sandbox = false' > /etc/nix/nix.conf \
&& for n in $(seq 1 10); do useradd -c "Nix build user $n" -d /var/empty -g nixbld -G nixbld -M -N -r -s "$(command -v nologin)" "nixbld$n"; done
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN set -o pipefail && curl -L https://nixos.org/nix/install | bash \
&& /nix/var/nix/profiles/default/bin/nix-collect-garbage --delete-old
ENV \
ENV=/etc/profile \
USER=root \
PATH=/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin \
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt \
NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \
NIX_PATH=/nix/var/nix/profiles/per-user/root/channels
RUN nix-channel --update
RUN mkdir /app/
WORKDIR /app/
# Setup
COPY environment.nix /app/
RUN nix-env -if environment.nix
# Load environment variables
ARG NPM_CONFIG_PRODUCTION NODE_ENV
ENV NPM_CONFIG_PRODUCTION=$NPM_CONFIG_PRODUCTION NODE_ENV=$NODE_ENV
# Install
COPY . /app/
RUN npm install
# Build
# Start
CMD node src/index.js
ulimit logs for Container(Layer 13)
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
memory(kbytes) unlimited
locked memory(kbytes) 8192
process unlimited
nofiles 1048576
vmemory(kbytes) unlimited
locks unlimited
rtprio 0
ulimit logs for Gitpod
tcore file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 256966
max locked memory (kbytes, -l) 8192
max memory size (kbytes, -m) unlimited
open files (-n) 1048576
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
from nixpacks.
Related NixOS/nixpkgs#170279
from nixpacks.
I think @wyzlle is on the right track. If I have a standard Dockerfile, I can build the image in gitpod. But the one that nixpacks generates using nix for packaging fails. Also, I tried the go and python examples and they also fail under gitpod.
from nixpacks.
Anyone had a chance to look at this? I have worked with gitpod and they believe it has to do with the way that nix is installed. One thing I noticed is that nix is installed as root. The docs recommend not to do this.
from nixpacks.
Anyone had a chance to look at this? I have worked with gitpod and they believe it has to do with the way that nix is installed. One thing I noticed is that nix is installed as root. The docs recommend not to do this.
If you can reproduce that using nix via root causes this, and using it via not root fixes it, we'd be happy to fix that
Beyond that, we're a bit limited on bandwidth ATM but you're welcome to take a crack at it yourself, or have one of the Gitpod people do jump into it
from nixpacks.
Closing for inactivity. We do also have a devcontainer setup in the Nixpacks repo that a few users use https://github.com/railwayapp/nixpacks/tree/main/.devcontainer
from nixpacks.
Related Issues (20)
- Unable to get prisma 5 with nixpacks openssl HOT 21
- SIGINT not passed to application HOT 5
- "Error: Cannot find module './pnpm.cjs'" when building Nx monorepo with NIXPACKS_NX_APP_NAME set HOT 2
- Running commands in Python container throws errors for incompatible ldd version HOT 1
- Option to skip `COPY . /app` HOT 6
- PHP 8.0 default Laravel build failing HOT 5
- add asdf support to python + poetry HOT 7
- Stream did not contain valid UTF-8 HOT 3
- Able to set Docker network and custom hosts during build HOT 7
- error: undefined variable 'pnpm-8_x' HOT 1
- Output environment variables during build
- Add NIXPACKS_VERSION to environment
- Projects containing read-only files cannot be built HOT 4
- Elixir nixpack shouldn't run migrations in build step HOT 1
- Redis internal URLs cause build errors HOT 8
- Support for pnpm v9 HOT 5
- Bun 1.1 - Nixpacks Feature Request HOT 3
- Rust provider tries to open Cargo.toml in wrong folder
- Nixpacks Feature Request: Python 3.12 Support HOT 1
- Nixpacks Feature Request,Support setting nix image source address HOT 1
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 nixpacks.