wasp command does not work in docker

I am trying to install wasp within a docker image, but it keeps failing.
7 Replies
kapa.ai
kapa.ai4mo ago
Hi @abhinav3295. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Based on the knowledge sources provided, it seems that some users have faced issues when trying to run Wasp in a Docker container. Here are some steps you can follow to troubleshoot: 1. Ensure that you have installed all the necessary dependencies in your Docker container, including Node.js and npm. 2. After installing Wasp, make sure to modify the .bashrc with the necessary paths. 3. Create a test app inside a folder in your Docker container and try running it. 4. If you're facing issues with the wasp command not being recognized, you might need to manually add the path to the System Variables. 5. If you're getting network errors when trying to define entities and query them, it could be due to CORS issues. You might need to configure your app to handle CORS. 6. If you're getting errors when trying to start the database, ensure that Docker is installed and in the PATH. Wasp needs Docker with PostgreSQL to run. 7. If you're still facing issues, you might want to consider building your Docker image using a Dockerfile instead of committing changes to a container. Remember to commit your Docker container to save it as an image after making changes. You can do this using the docker commit command. For more detailed instructions on how to use Wasp, you can refer to the Wasp CLI Reference (https://wasp-lang.dev/docs/general/cli#overview). If you're still facing issues, it would be helpful to have more specific details about the error messages you're encountering. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @abhinav3295, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
abhinav3295
abhinav3295OP4mo ago
@kapa.ai I am already using a Dockerfile, here is its content
FROM ubuntu:focal
RUN apt-get update -y
RUN apt-get install curl bash -y

ENV NVM_DIR $HOME/.nvm
ENV NODE_VERSION 18.12.0

RUN mkdir $NVM_DIR
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash

RUN \. $NVM_DIR/nvm.sh && \
nvm install $NODE_VERSION

ENV PATH $PATH:/root/.local/bin

RUN curl -sSL https://get.wasp-lang.dev/installer.sh | bash
FROM ubuntu:focal
RUN apt-get update -y
RUN apt-get install curl bash -y

ENV NVM_DIR $HOME/.nvm
ENV NODE_VERSION 18.12.0

RUN mkdir $NVM_DIR
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash

RUN \. $NVM_DIR/nvm.sh && \
nvm install $NODE_VERSION

ENV PATH $PATH:/root/.local/bin

RUN curl -sSL https://get.wasp-lang.dev/installer.sh | bash
When running wasp command, I keep getting following error:
root@41f88f297d9b:/# wasp version
/root/.local/bin/wasp: line 2: 440 Killed waspc_datadir=/root/.local/share/wasp-lang/0.14.0/data /root/.local/share/wasp-lang/0.14.0/wasp-bin "$@"
root@41f88f297d9b:/# wasp version
/root/.local/bin/wasp: line 2: 440 Killed waspc_datadir=/root/.local/share/wasp-lang/0.14.0/data /root/.local/share/wasp-lang/0.14.0/wasp-bin "$@"
kapa.ai
kapa.ai4mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- The error message you're seeing typically indicates that the process was terminated by the Linux kernel. This is often due to the system running out of memory or some other system-level constraint. Here are a few things you could try: 1. Increase the memory allocated to Docker: If you're running this on a system with Docker Desktop, you can increase the allocated memory in the Docker Desktop settings. 2. Check for system constraints: If you're running this on a server, check if there are any system-level constraints or limits that might be causing the process to be killed. This could include memory limits, CPU limits, or other resource limits. 3. Check the Node.js version: The Dockerfile is installing Node.js version 18.12.0, but this version does not exist. The latest LTS version of Node.js is 16.13.0. You might want to change the NODE_VERSION environment variable to a valid Node.js version. 4. Check the Wasp version: Make sure you're installing a valid version of Wasp. You can check the list of valid versions on the Wasp GitHub releases page (https://github.com/wasp-lang/wasp/releases). 5. Debug the installation script: You could add some debug information to the installation script to see exactly what's happening when the wasp command is run. If none of these suggestions help, it would be useful to have more information about the system you're running this on, including the amount of memory and other resources available. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @abhinav3295, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
abhinav3295
abhinav3295OP4mo ago
@kapa.ai any followup reponses that can help me with this issue?
kapa.ai
kapa.ai4mo ago
Let me check the knowledge base for you. One moment! :books: ---------------------- I'm sorry, but without additional information or updates from the knowledge sources provided, I can't provide further assistance on this issue. However, I would recommend checking the official Wasp documentation or their GitHub issues page for similar problems and potential solutions. You might also consider reaching out to the Wasp community on their Discord server for more immediate assistance. - Wasp Documentation (https://wasp-lang.dev/docs) - Wasp GitHub Issues (https://github.com/wasp-lang/wasp/issues) - Wasp Discord Server (https://discord.com/invite/rzdnErX) Remember, the error you're seeing is often related to system-level constraints, so it might be worth investigating your Docker setup and resources further. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @abhinav3295, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
abhinav3295
abhinav3295OP4mo ago
INterestingly this issue was happening only in my MacM2 Switching to a windows PC resolved the issue
Want results from more Discord servers?
Add your server