Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add devcontainer #925

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

NicoZweifel
Copy link

I was trying to run the tests in a docker container and ended up with this devcontainer after
having some fun with deno-puppeteer.

lucacasonato/deno-puppeteer/pull/70
lucacasonato/deno-puppeteer/pull/71

The dependencies in the Dockerfile there are pretty much the same and it could be reused as a base image (tested locally):

ARG DENO_VERSION=1.28.2
FROM denoland/puppeteer:$DENO_VERSION

WORKDIR /app

COPY . .

RUN  deno cache --no-check --import-map=./www/import_map.json src/dev/deps.ts src/server/deps.ts www/main.ts

# Set DENO_DEPLOYMENT_ID
RUN /bin/bash -l -c 'echo export DENO_DEPLOYMENT_ID=$"(git rev-parse HEAD)" > /etc/profile.d/docker_init.sh'

EXPOSE 8000

CMD ["task", "test"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant