25 lines
801 B
Docker
25 lines
801 B
Docker
# Base on latest (edge) alpine image
|
|
FROM node:current-alpine as builder
|
|
RUN apk add -U git build-base python3 build-base python3 && \
|
|
git clone https://github.com/butlerx/wetty --branch main /usr/src/app
|
|
WORKDIR /usr/src/app
|
|
COPY . /usr/src/app
|
|
RUN yarn && \
|
|
yarn build && \
|
|
yarn install --production --ignore-scripts --prefer-offline
|
|
|
|
FROM node:current-alpine
|
|
LABEL maintainer="docker@ervine.org"
|
|
WORKDIR /usr/src/app
|
|
ENV NODE_ENV=production
|
|
EXPOSE 3000
|
|
COPY --from=builder /usr/src/app/build /usr/src/app/build
|
|
COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules
|
|
COPY --from=builder /usr/src/app/package.json /usr/src/app/
|
|
RUN apk add -U openssh-client sshpass && \
|
|
mkdir ~/.ssh
|
|
EXPOSE 3000
|
|
|
|
ENTRYPOINT [ "yarn" , "docker-entrypoint", "--conf", "config.json" ]
|
|
|