Skip to content

Instantly share code, notes, and snippets.

@wilcorrea

wilcorrea/Dockerfile

Last active Aug 21, 2020
Embed
What would you like to do?
Quasar with docker
#!/bin/bash
if [[ ! -d /var/www/app/node_modules ]]; then
echo "~> installing dependencies"
yarn install
fi
if [[ ! -f /home/node/bin/node && -f /usr/local/bin/node ]]; then
echo "~> expose bin"
cp /usr/local/bin/node /home/node/bin/node
echo "~> fix permissions"
chown -R node:node .
fi
echo "Details: '$(pwd)' | '$(quasar -v)'"
echo "~> starting dev"
quasar dev
version: '3'
# services
services:
# app
quasar-app:
container_name: quasar-app
user: node
image: tevun/quasar:latest
working_dir: /var/www/app
command: bash /var/www/app/docker-compose.sh
volumes:
- .:/var/www/app
- ./.bin:/home/node/bin
ports:
- 8000:8000
# tevun/quasar
FROM node:alpine
RUN apk --update add openssh-client git
RUN npm install --global \
@vue/cli@4.5.4 && \
@vue/cli-init@4.5.4 \
@quasar/cli@1.1.0\
http-server@0.11.1
RUN mkdir /home/node/app
WORKDIR /home/node/app
CMD /bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.