Skip to main content
Module

x/esm/Dockerfile

A fast, global CDN for NPM packages with ESM format.
Go to Latest
File
FROM golang:1.18 AS build
RUN apt-get update -y && apt-get install -y xz-utilsRUN useradd -u 1000 -m esmRUN mkdir /esm && chown esm:esm /esmRUN git clone https://github.com/esm-dev/esm.sh /esm/esm.shRUN echo "{\"port\":80,\"workDir\":\"/esm\"}" >> /esm/config.json
USER esmWORKDIR /esmRUN go build -o bin/esmd esm.sh/main.go
ENTRYPOINT ["/esm/bin/esmd", "--config", "config.json"]