Skip to content

Instantly share code, notes, and snippets.

@robertdrakedennis
Created September 3, 2022 01:05
Show Gist options
  • Save robertdrakedennis/8165d36e1e252d108075c501574eeb89 to your computer and use it in GitHub Desktop.
Save robertdrakedennis/8165d36e1e252d108075c501574eeb89 to your computer and use it in GitHub Desktop.
Astrojs image for fly.io
Dockerfile
.dockerignore
node_modules
npm-debug.log
README.md
.git
dist
# Install dependencies only when needed
FROM node:16-alpine AS builder
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
COPY . .
RUN npm install --frozen-lockfile
RUN npm run build
FROM pierrezemb/gostatic AS runner
COPY --from=builder /dist /srv/http
CMD ["-port","8080","-https-promote", "-enable-logging"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment