Created
May 23, 2021 16:40
-
-
Save arellano-gustavo/cc1a0bfa9b60850f5c600e8d12d2a103 to your computer and use it in GitHub Desktop.
Dockerfile for a VueJS clean environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN apt-get update | |
RUN apt-get -y install sudo | |
RUN apt-get -y install curl | |
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - | |
RUN apt-get install -y nodejs | |
RUN npm install -g @vue/cli | |
RUN useradd -m ejemplo && echo "ejemplo:ejemplo" | chpasswd && adduser ejemplo sudo | |
RUN gpasswd -a ejemplo sudo | |
RUN su -l ejemplo | |
USER ejemplo | |
CMD /bin/bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some reason, when I run this dockerfile in my local personal computer, I get errors when installing cURL
In my cloud (AWS) it run perfect.
After creating an image: docker build . -t ejemplo
We can run the container like this: docker run -it ejemplo
Once we are inside, we can create a directory, move into that directory and execute:
vue create prueba
Some questions will be asked and after that, we can run:
npm run serve
Voila !!!!! Everything is done !!!!