Skip to content

Commit

Permalink
clean up comments from dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanjam committed May 15, 2024
1 parent 32798a0 commit 2968e06
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
13 changes: 3 additions & 10 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# Dockerfile from Astro docs

# cant use alpine for sharp images on arm
# dark thumbnails on both slim (doesn't have git) and bookworm (has git)
# ARG NODE_IMAGE=node:22.1.0-bookworm
# ARG NODE_IMAGE=node:20.13.1-slim
# alpine is fine
# node:22.1.0-bookworm, node:20.13.1-slim, node:20.13.1-alpine
ARG NODE_IMAGE=node:20.13.1-alpine

FROM ${NODE_IMAGE} AS base
WORKDIR /app

# install git on slim
# RUN apt-get update && apt-get install -y \
# ca-certificates \
# git \
# && rm -rf /var/lib/apt/lists/*

# for alpine
RUN apk add --no-cache git

FROM base AS build
Expand Down
11 changes: 8 additions & 3 deletions docs/todo3.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ update github actions after monorepo
print commit hash and message in html, node package_
analytics in BaseHead with goatcounter.com and sentry
add author email, social networks, name to constants

active item in navbar
----
// fix sharp yarn
// https://github.com/withastro/astro/issues/9345#issuecomment-1868330138
Expand All @@ -82,18 +82,23 @@ can use nginx alpine without node for final prod image, 15mb
must use arm1.nemanjamitic.com for correct dns
must use docker login in ssh for private image
must use qemu and buildx for arm linux/arm64 docker image
cant use node-alpine for sharp
cant use node-alpine for sharp // wrong, both alpine, slim and bookworm will work
must add apt-get git in node-slim, for commit info in html on build
must not add .git in dockerignore
must add script_stop: false for non existing image in ssh deploy

----
// sharp radi na alpine // ok
node:22.1.0-bookworm - has git
node:20.13.1-slim - doesnt have git
sharp 0.32.6 - dark resized thumbnails in docker arm
node:20.13.1-alpine - doesnt have git
// to, 0.32 radi samo na x86, 0.33 radi i na arm ali mora -ignore-engines
sharp 0.32.6 - black resized thumbnails in docker arm
sharp 0.33.3 - must use --ignore-engines, ok thumbnails on arm
// override
RUN yarn add --arch=arm64 --platform=linux --libc=musl --ignore-engines sharp@0.33.3
// samo ovo bi radilo, ali ajde
RUN yarn add --ignore-engines sharp


```

0 comments on commit 2968e06

Please sign in to comment.