2021-04-27 20:17:32 +02:00
|
|
|
FROM docker.io/crystallang/crystal:1.0.0-alpine AS builder
|
2021-01-07 13:20:18 +01:00
|
|
|
WORKDIR /app
|
|
|
|
COPY ./shard.yml ./shard.yml
|
|
|
|
RUN shards install
|
|
|
|
COPY ./src/ ./src/
|
2021-05-30 06:44:09 -07:00
|
|
|
RUN crystal build ./src/instances.cr -s -p -t
|
2021-01-07 13:20:18 +01:00
|
|
|
|
|
|
|
FROM alpine:latest
|
2021-05-30 06:44:09 -07:00
|
|
|
RUN apk add --no-cache gc pcre libgcc yaml
|
2021-01-07 13:20:18 +01:00
|
|
|
WORKDIR /app
|
|
|
|
RUN addgroup -g 1000 -S invidious && \
|
|
|
|
adduser -u 1000 -S invidious -G invidious
|
|
|
|
COPY ./assets/ ./assets/
|
2021-05-30 06:44:09 -07:00
|
|
|
COPY ./config.yml ./config.yml
|
2021-01-07 13:20:18 +01:00
|
|
|
COPY --from=builder /app/instances .
|
|
|
|
|
|
|
|
EXPOSE 3000
|
|
|
|
USER invidious
|
|
|
|
CMD ["/app/instances"]
|