Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parabens pelo Projeto - Fiz um Dockerfile para ele #1

Open
jniltinho opened this issue Apr 9, 2020 · 1 comment
Open

Parabens pelo Projeto - Fiz um Dockerfile para ele #1

jniltinho opened this issue Apr 9, 2020 · 1 comment

Comments

@jniltinho
Copy link

jniltinho commented Apr 9, 2020

Dockerfile , colocar esse arquivo na Raiz do Projeto

# estágio de compilação
FROM node:10.20-alpine as build-stage
LABEL maintainer="Nilton Oliveira jniltinho@gmail.com"
ENV TZ America/Sao_Paulo

## docker build --no-cache -t expenses .
## docker run -d -p 8080:80 expenses

WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build

# estágio de produção
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

Para fazer o build da imagem docker

docker build --no-cache -t expenses .

Para Rodar a imagem Docker

docker run -d -p 8080:80 expenses

## Acesse http:/localhost:8080/
@jniltinho
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant