-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 944 Bytes
/
Dockerfile
File metadata and controls
33 lines (25 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Voir : https://github.com/denoland/deno_docker/blob/main/alpine.dockerfile
ARG DENO_VERSION=2.7.14
ARG BIN_IMAGE=denoland/deno:bin-${DENO_VERSION}
FROM ${BIN_IMAGE} AS bin
FROM frolvlad/alpine-glibc:alpine-3.13
# Installer les certificats nécessaires
RUN apk --no-cache add ca-certificates
# Créer un utilisateur non-root pour exécuter Deno
RUN addgroup --gid 1000 deno \
&& adduser --uid 1000 --disabled-password deno --ingroup deno \
&& mkdir /deno-dir/ \
&& chown deno:deno /deno-dir/
# Configurer les variables d'environnement pour Deno
ENV DENO_DIR /deno-dir/
ENV DENO_INSTALL_ROOT /usr/local
# Copier l'exécutable Deno depuis l'image source
ARG DENO_VERSION
ENV DENO_VERSION=${DENO_VERSION}
COPY --from=bin /deno /bin/deno
# Définir le répertoire de travail et copier les fichiers
WORKDIR /deno-dir
COPY . .
# Deno
ENTRYPOINT ["/bin/deno"]
CMD ["run", "--allow-net", "https://deno.land/std/examples/echo_server.ts"]