FROM alpine:latest RUN apk add --no-cache crystal shards openssl openssl-dev musl-dev libc6-compat COPY . /opt/app/ RUN cd /opt/app && \ shards RUN cd /opt/app/ && crystal build --mcpu $(gcc -march=native -Q --help=target|grep march|awk '{print $2}'|head -n 1) --release src/sales_backend.cr CMD /opt/app/sales_backend