This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
73 lines (64 loc) · 1.96 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM fpco/stack-build-small:lts-22.28 AS builder
LABEL maintainer="Pat Brisbin <[email protected]>"
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gcc \
locales \
netbase && \
locale-gen en_US.UTF-8 && \
rm -rf /var/lib/apt/lists/*
RUN mkdir -p /src/bin
WORKDIR /src
COPY stack.yaml /src/stack.yaml
COPY restylers/package.yaml /src/restylers/package.yaml
RUN stack install --dependencies-only --test --no-run-tests
COPY restylers /src/restylers/
RUN stack install --pedantic --test
RUN curl -sL https://get.docker.com/ | sh
FROM ubuntu:24.04
LABEL maintainer="Pat Brisbin <[email protected]>"
ENV DEBIAN_FRONTEND=noninteractive LANG=C.UTF-8 LC_ALL=C.UTF-8
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
git \
gnupg \
jq \
locales \
netbase \
ruby-full \
unzip && \
locale-gen en_US.UTF-8 && \
rm -rf /var/lib/apt/lists/*
RUN gem install jwt
# AWS CLIv2
RUN \
cd /tmp && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf aws awscliv2.zip
# Docker
COPY --from=builder /usr/bin/docker /bin/docker
COPY --from=docker/buildx-bin /buildx /usr/libexec/docker/cli-plugins/docker-buildx
RUN docker buildx version
COPY --from=builder /root/.local/bin/restylers /bin/restyled-restylers
# Some kind of bug here? "cannot copy to non-directory" Doing just bin works.
#COPY files/ /
COPY files/bin/ /bin/
ENV GIT_AUTHOR_NAME=Restyled.io
ENV GIT_COMMITTER_NAME=Restyled.io
# Restyle
ENV BUMP_TO_FORCE_RESTYLER_REINSTALL=0
RUN curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/restyled-io/restyler/main/install | sh
RUN mkdir -p /code
WORKDIR /code
ENTRYPOINT ["restyled"]