Open shurick81 opened 4 years ago
Thanks for the idea, and you're reading my mind. I do have a Dockerfile
already in the upcoming preview - stay tuned
@shurick81 - here's the Dockerfile
I've been using for a project. Any comments, thoughts or additions?
FROM node:14 AS BUILD_IMAGE
RUN curl -sfL https://install.goreleaser.com/github.com/tj/node-prune.sh | bash -s -- -b /usr/local/bin
WORKDIR /app
COPY . /app/
# install
RUN npm install
# build
RUN npm run build
# remove development dependencies
RUN npm prune --production
# run node prune
RUN /usr/local/bin/node-prune
FROM node:14-alpine
WORKDIR /app
# copy from build image
COPY --from=BUILD_IMAGE /app/dist ./dist
COPY --from=BUILD_IMAGE /app/node_modules ./node_modules
ENV DEBUG msteams
EXPOSE 3007
CMD [ "node", "dist/server.js" ]
@wictorwilen is that an image that one can use for scaffolding new Teams solutions or for building those? Sorry I'm having a hard time figuring this out. That is more or less Dockerfile that I was thinking of when it comes to scaffolding:
FROM node:14-alpine
RUN npm i -g yo generator-teams@2.15.0
VOLUME /usr/app/teams
WORKDIR /usr/app/teams
RUN sed -i -e /rootCheck/d /usr/local/lib/node_modules/yo/lib/cli.js
CMD /bin/bash
And then the usage of the image:
docker run -it --rm -v ${pwd}:/usr/app/teams generator-teams:2.15.0.2 yo teams
Gotcha! This was more meant for publishing the application.
@shurick81 - what if you helped with testing this, and then we could automate this through Github actions and automatically publish a new version every time there's a new release?
Sure, I'm in. I will test the one that you shared for the publishing the application and I will get back to you.
I have looked at the image you provided, it looks good for testing and hosting purposes. For example, a way to run it will be using some commandline like docker run -it --rm -p 3007:3007 generator-teams:2.15.0.3
. Am I taking it right? However, it is not something one should put on a public registry, or?
How about taking a step back and trying to figure out all the possible use cases and then we see how we can facilitate these use cases via publishing some reusable snippets and images. Here's my ideas for use cases:
yo teams
or should we even consider yo @microsoft/sharepoint
depending on the desirable scenario?npm install
.gulp serve
, gulp ngrok-serve
.npm run build
and gulp manifest
.So let's check if I got it incorrectly and then we can discuss what exactly we should help developers with?
Is your feature request related to a problem? Please describe. The problem is that in order to try this generator, I need to install the generator and dependencies.
Describe the solution you'd like If there was a public image in Docker Hub, I could just run one command to generate the solution on any machine with docker installed.
Describe alternatives you've considered What we might start with is providing the Dockerfile that other people can use for building an image locally.