1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Deno in Docker

Last updated at Posted at 2022-07-15

deno の動作環境をDockerで構築したのでその時のチラウラメモです。
Webサーバとしてではなく、単にTypeScriptのコードをDenoで実行してみよう、というスタンスです。

deno: https://deno.land/

Dockerfile
FROM debian:stable-slim

WORKDIR /app

RUN apt-get update \
  && apt-get install -y curl zip unzip git \
  && apt-get clean \
  && curl -fsSL https://deno.land/x/install/install.sh | sh

ENV DENO_INSTALL="/root/.deno"
ENV PATH="$DENO_INSTALL/bin:$PATH"

COPY . /app
./main.ts
console.log('deno is running!');
terminal
$ docker build . -t deno
$ docker container run --rm deno deno run main.ts

これで、ターミナルに deno is running! が出力されました。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?