Switch to alpine as base image
This commit is contained in:
39
Dockerfile
39
Dockerfile
@@ -1,41 +1,26 @@
|
|||||||
FROM ubuntu:latest AS builder
|
FROM alpine:latest AS builder
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apk add -u perl-app-cpanminus apkbuild-cpan perl-dev build-base perl
|
||||||
build-essential \
|
|
||||||
curl \
|
|
||||||
perl \
|
|
||||||
cpanminus \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN cpanm Crypt::RC4
|
RUN cpanm Crypt::RC4
|
||||||
RUN cpanm Digest::CRC
|
RUN cpanm Digest::CRC
|
||||||
RUN cpanm Crypt::Blowfish
|
RUN cpanm Crypt::Blowfish
|
||||||
RUN cpanm Archive::Zip
|
RUN cpanm Archive::Zip --force
|
||||||
RUN cpanm OLE::Storage_Lite
|
RUN cpanm OLE::Storage_Lite
|
||||||
RUN apt-get remove -y \
|
RUN apk del perl-app-cpanminus apkbuild-cpan perl-dev build-base
|
||||||
build-essential \
|
RUN rm -rf /var/cache/apk
|
||||||
curl \
|
ADD http://hexacorn.com/d/DeXRAY.pl /bin/dexray
|
||||||
perl \
|
RUN chmod +rx /bin/dexray
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
ADD http://hexacorn.com/d/DeXRAY.pl /bin/dexray
|
|
||||||
RUN chmod +rx /bin/dexray
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FROM ubuntu:latest
|
FROM alpine:latest
|
||||||
ARG PUID=1001
|
ARG PUID=1001
|
||||||
ARG PGID=1001
|
ARG PGID=1001
|
||||||
|
|
||||||
MAINTAINER tabledevil
|
MAINTAINER tabledevil
|
||||||
COPY --from=builder . .
|
COPY --from=builder . .
|
||||||
|
RUN mkdir /data
|
||||||
# ADD start.sh /start.sh
|
RUN adduser -D -u 1001 -s "/bin/busybox nologin" nonroot 1001
|
||||||
# RUN chmod +x /start.sh
|
RUN chown -R nonroot:nonroot /data
|
||||||
RUN groupadd -g ${PGID} -r nonroot && \
|
|
||||||
useradd -u ${PUID} -r -g nonroot -d /home/nonroot -s /sbin/nologin -c "Nonroot User" nonroot && \
|
|
||||||
mkdir /home/nonroot && \
|
|
||||||
chown -R nonroot:nonroot /home/nonroot
|
|
||||||
# ENTRYPOINT ["/start.sh"]
|
|
||||||
# CMD ["shell"]
|
|
||||||
USER nonroot
|
USER nonroot
|
||||||
WORKDIR /data/
|
WORKDIR /data/
|
||||||
Reference in New Issue
Block a user