Ditzzy AF commited on
Commit
2cd1bf6
·
1 Parent(s): 3b1b7cc

feat: add asset downloads to Dockerfile

Browse files

Download pattern images and emoji JSON files from quote-api repository
during Docker build process, removing hardcoded DNS resolution fix and
adding verification step for downloaded assets.

Files changed (1) hide show
  1. Dockerfile +21 -5
Dockerfile CHANGED
@@ -11,14 +11,30 @@ RUN apk add --no-cache \
11
  # buat symlink resolv
12
  RUN ln -s /lib/libresolv.so.2 /usr/lib/libresolv.so.2
13
 
14
- # Fix DNS resolution
15
- RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf \
16
- && echo "nameserver 8.8.4.4" >> /etc/resolv.conf \
17
- && echo "nameserver 1.1.1.1" >> /etc/resolv.conf
18
-
19
  # install node modules
20
  RUN npm install
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  # verify downloaded files
23
  RUN ls -lah assets/ && ls -lah assets/emoji/
24
 
 
11
  # buat symlink resolv
12
  RUN ln -s /lib/libresolv.so.2 /usr/lib/libresolv.so.2
13
 
 
 
 
 
 
14
  # install node modules
15
  RUN npm install
16
 
17
+ # download assets
18
+ RUN mkdir -p assets/emoji
19
+
20
+ # download pattern images
21
+ RUN curl -fsSL -o assets/pattern_02.png \
22
+ https://raw.githubusercontent.com/LyoSU/quote-api/master/assets/pattern_02.png \
23
+ && curl -fsSL -o assets/pattern_ny.png \
24
+ https://raw.githubusercontent.com/LyoSU/quote-api/master/assets/pattern_ny.png \
25
+ && curl -fsSL -o assets/pattern_ny_old.png \
26
+ https://raw.githubusercontent.com/LyoSU/quote-api/master/assets/pattern_ny_old.png
27
+
28
+ # download emoji JSON files
29
+ RUN curl -fsSL -o assets/emoji/emoji-apple-image.json \
30
+ https://raw.githubusercontent.com/LyoSU/quote-api/master/assets/emoji/emoji-apple-image.json \
31
+ && curl -fsSL -o assets/emoji/emoji-google-image.json \
32
+ https://raw.githubusercontent.com/LyoSU/quote-api/master/assets/emoji/emoji-google-image.json \
33
+ && curl -fsSL -o assets/emoji/emoji-joypixels-image.json \
34
+ https://raw.githubusercontent.com/LyoSU/quote-api/master/assets/emoji/emoji-joypixels-image.json \
35
+ && curl -fsSL -o assets/emoji/emoji-twitter-image.json \
36
+ https://raw.githubusercontent.com/LyoSU/quote-api/master/assets/emoji/emoji-twitter-image.json
37
+
38
  # verify downloaded files
39
  RUN ls -lah assets/ && ls -lah assets/emoji/
40