~mapperr/dockerfiles

6b653c14fce0f512305a59cc8bbe39dc4aee2af3 — mapperr 5 months ago 50dba0c
new dockerfile syntax
1 files changed, 25 insertions(+), 12 deletions(-)

M laminarCI/Dockerfile
M laminarCI/Dockerfile => laminarCI/Dockerfile +25 -12
@@ 1,31 1,44 @@
# syntax=docker/dockerfile:1.6

FROM laminarci/laminar
# ^-- have to be built locally
# ^-- must be built locally
# check https://github.com/ohwgiles/laminar/tree/master/docker

USER root

COPY <<-EOF /bin/laminar_ssh_entrypoint
    laminarc \$SSH_ORIGINAL_COMMAND
EOF

COPY --from=docker:dind /usr/local/bin/docker /bin/
RUN \
RUN <<-EOF
    set -e
    chmod u+x /bin/laminar_ssh_entrypoint
    apk add --no-cache -X http://dl-3.alpinelinux.org/alpine/edge/testing/ \
    bash \
    git \
    rsync \
    curl \
    jq \
    openssh && \
    ssh-keygen -A && \
    mkdir /var/lib/laminar/.ssh && \
    chown laminar:users /var/lib/laminar/.ssh && \
    openssh
    ssh-keygen -A
    mkdir /var/lib/laminar/.ssh
    chown laminar:users /var/lib/laminar/.ssh
    chmod 700 /var/lib/laminar/.ssh
EOF


ADD entry.sh /entry.sh
RUN \
    chmod a+x /entry.sh && \
    addgroup -g 998 docker1 && \
    adduser laminar docker1 && \
    addgroup -g 962 docker2 && \
RUN <<-EOF
    chmod a+x /entry.sh
    # various docker socket groups
    # debian 10/11
    addgroup -g 998 docker1
    adduser laminar docker1
    # archlinux
    addgroup -g 962 docker2
    adduser laminar docker2

EOF

ENTRYPOINT [ "/sbin/tini", "--" ]
CMD [ "/entry.sh" ]