diff --git a/containers/wetty/Dockerfile b/containers/wetty/Dockerfile index 22d31dc..77f34ce 100644 --- a/containers/wetty/Dockerfile +++ b/containers/wetty/Dockerfile @@ -11,15 +11,10 @@ LABEL maintainer="butlerx@notthe.cloud" WORKDIR /usr/src/app ENV NODE_ENV=production EXPOSE 3000 -COPY --from=builder /usr/src/app/dist /usr/src/app/dist +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 package.json /usr/src/app -COPY index.js /usr/src/app RUN apk add -U openssh-client sshpass && \ - mkdir ~/.ssh && \ - echo '#!/usr/bin/env sh' >> /entrypoint.sh && \ - echo 'ssh-keyscan -H wetty-ssh >> ~/.ssh/known_hosts' >> /entrypoint.sh && \ - echo 'node .' >> /entrypoint.sh && \ - chmod +x /entrypoint.sh + mkdir ~/.ssh -ENTRYPOINT [ "/entrypoint.sh" ] +ENTRYPOINT [ "yarn" , "docker-entrypoint"] diff --git a/package.json b/package.json index ea62c2f..4bca627 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,8 @@ "start": "NODE_ENV=production node .", "contributor": "all-contributors", "test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register src/**/*.spec.ts", - "clean": "rm -rf build yarn-error.log" + "clean": "rm -rf build yarn-error.log", + "docker-entrypoint": "ssh-keyscan -H wetty-ssh >> ~/.ssh/known_hosts; yarn start" }, "repository": { "type": "git",