Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
add Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvgamerr committed Aug 28, 2020
1 parent 24c3001 commit b5960b0
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM node:lts AS builder

WORKDIR /app
COPY . /app

RUN npm i
RUN npm run build
RUN rm -Rf ./.github \
./assets \
./components \
./docs \
./layouts \
./pages \
./node_modules

FROM node:lts-alpine

ENV TZ Asia/Bangkok
ENV NODE_ENV production

WORKDIR /app
COPY --from=builder /app .
RUN npm i

CMD ["npm", "start"]

# FROM golang:1.7.3 AS builder
# WORKDIR /go/src/github.com/alexellis/href-counter/
# RUN go get -d -v golang.org/x/net/html
# COPY app.go .
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .

0 comments on commit b5960b0

Please sign in to comment.