-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathDockerfile
43 lines (28 loc) · 1.01 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
# Stage 1: Build stage
FROM alpine:latest as builder
# hadolint disable=DL3018
ARG UID=1000
ARG GID=1000
RUN addgroup -g ${GID} myuser && adduser -u ${UID} -G myuser -D myuser
RUN apk update && apk add --no-cache sudo
RUN echo "myuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER myuser
RUN sudo apk add --no-cache wget bash curl sed grep
COPY sources-for-download /app/sources-for-download
# Stage 2: Final stage
#FROM alpine:latest
FROM ubuntu:latest
ARG UID=1000
ARG GID=1000
RUN groupadd -g ${GID} myuser && useradd -u ${UID} -g myuser -m myuser
RUN apt-get update && apt-get install -y curl wget
# Create the 'issues' directory with desired ownership inside the container
RUN mkdir -p /app/issues \
&& chown -R myuser:myuser /app/issues
COPY --from=builder /app/sources-for-download /app/sources-for-download
COPY linux_mac /app/linux_mac
RUN chown -R myuser:myuser /app/linux_mac
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
USER myuser
ENTRYPOINT ["/bin/sh", "/app/entrypoint.sh"]