# Base on latest (edge) alpine image FROM node:current-alpine as builder RUN apk add -U git build-base python3 curl && \ curl -L https://github.com/butlerx/wetty/archive/refs/tags/v2.7.0.tar.gz -o /tmp/wetty.tar.gz && \ tar zxvf /tmp/wetty.tar.gz -C /tmp WORKDIR /usr/src/app COPY . /usr/src/app RUN mv /tmp/wetty-2.7.0/* . && \ 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 ENTRYPOINT [ "yarn", "docker-entrypoint", "--conf", "config.json" ]