amberframework / amber

A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
https://amberframework.org
MIT License
2.57k stars 205 forks source link

Please update official Docker images for current release #1294

Closed m6butterfly closed 1 year ago

m6butterfly commented 1 year ago

Description

Creating new amber projects produces Dockerfile with amber image that doesn't exist. The newest amber image is for version 1.0.0. The image labeled 'latest' is from 3 years ago.

Steps to Reproduce

  1. amber new my-project
  2. cd my-project
  3. docker-compose up

Expected behavior: should produce a usable Dockerfile, for current amber version, which creates the containers listed in docker-compose.yml

Actual behavior: tries to pull non-existent amber:1.2.2 image, see below

FROM amberframework/amber:1.2.2

WORKDIR /app

COPY shard.* /app/ RUN shards install

COPY . /app

RUN rm -rf /app/node_modules

CMD amber watch

Reproduces how often: every time

Versions

Crystal Version: 1.5.0 Amber Version: 1.2.2 OS: MacOS Monterey 12.5.1 (intel chip)

Additional Information

docker-compose up [+] Running 0/2 ⠿ migrate Error 2.7s ⠿ app Error 2.7s [+] Building 1.7s (3/3) FINISHED
=> [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 184B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => ERROR [internal] load metadata for docker.io/amberframework/amber:1.2.2 1.5s [internal] load metadata for docker.io/amberframework/amber:1.2.2:

failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: docker.io/amberframework/amber:1.2.2: not found

drujensen commented 1 year ago

Hi @m6butterfly. Unfortunately, the Crystal team doesn't support arm64 images yet and I moved to the Apple m1 chip. I will try to perform an emulation or cross compilation for amd64.

crimson-knight commented 1 year ago

There are also some periodic weird issues with the Crystal compiler when using a docker image on the M1 that have made it very hard for me to update this. I ran into this when trying to setup a Crystal+Rails project on Fly.io.

drujensen-happymoney commented 1 year ago

I couldn't get crystal 1.5.0 to work so I used crystal 1.0.0:

https://hub.docker.com/repository/docker/amberframework/amber

m6butterfly commented 1 year ago

Thanks! docker-compose up works with the new image.