「🏗️」 wip: FTP should be working but f*ck it let's drink beers
This commit is contained in:
@ -1,26 +1,34 @@
|
||||
FROM scratch AS builder
|
||||
ADD docker/alpine/alpine-minirootfs-3.21.2-x86_64.tar.gz /
|
||||
|
||||
RUN apk add --no-cache go
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY go.sum /build/go.sum
|
||||
COPY go.mod /build/go.mod
|
||||
COPY cmd /build/cmd
|
||||
COPY internal /build/internal
|
||||
|
||||
RUN cd /build \
|
||||
&& go get git.keyzox.me/42_adjoly/inception/cmd/nginx/entrypoint \
|
||||
&& go build git.keyzox.me/42_adjoly/inception/cmd/nginx/entrypoint
|
||||
|
||||
FROM scratch
|
||||
ADD docker/alpine/alpine-minirootfs-3.21.2-x86_64.tar.gz /
|
||||
|
||||
LABEL version="0.1"
|
||||
LABEL maintainer="KeyZox"
|
||||
|
||||
COPY go.mod /build/go.mod
|
||||
COPY cmd /build/cmd
|
||||
COPY internal /build/internal
|
||||
COPY --from=builder /build/entrypoint /docker-entrypoint
|
||||
|
||||
RUN set -x \
|
||||
&& addgroup -g 101 -S nginx\
|
||||
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
|
||||
&& apk add --no-cache go nginx openssl tzdata envsubst curl \
|
||||
&& cd /build \
|
||||
&& go get git.keyzox.me/42_adjoly/inception/cmd/nginx/entrypoint \
|
||||
&& go build git.keyzox.me/42_adjoly/inception/cmd/nginx/entrypoint \
|
||||
&& cp /build/entrypoint /docker-entrypoint \
|
||||
&& apk add --no-cache nginx openssl tzdata envsubst curl \
|
||||
&& chmod +x /docker-entrypoint \
|
||||
&& apk del go \
|
||||
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
||||
&& ln -sf /dev/stderr /var/log/nginx/error.log \
|
||||
&& rm -Rf /build \
|
||||
&& rm -rf /var/cache/apk/* \
|
||||
&& mkdir -p /var/www/html \
|
||||
&& mkdir -p /etc/nginx/conf.d \
|
||||
|
Reference in New Issue
Block a user