~mapperr/dockerfiles

50dba0cdf361acbf9f6fe08314ddcc954a3b61aa — mapperr 6 months ago 420a575
laminar: improve working with docker secrets
3 files changed, 6 insertions(+), 8 deletions(-)

M laminarCI/Dockerfile
M laminarCI/build.sh
M laminarCI/entry.sh
M laminarCI/Dockerfile => laminarCI/Dockerfile +4 -2
@@ 4,7 4,6 @@ FROM laminarci/laminar

USER root


COPY --from=docker:dind /usr/local/bin/docker /bin/
RUN \
    apk add --no-cache -X http://dl-3.alpinelinux.org/alpine/edge/testing/ \


@@ 14,7 13,10 @@ RUN \
    curl \
    jq \
    openssh && \
    ssh-keygen -A
    ssh-keygen -A && \
    mkdir /var/lib/laminar/.ssh && \
    chown laminar:users /var/lib/laminar/.ssh && \
    chmod 700 /var/lib/laminar/.ssh

ADD entry.sh /entry.sh
RUN \

M laminarCI/build.sh => laminarCI/build.sh +1 -1
@@ 1,4 1,4 @@
#!/bin/sh
#!/bin/sh -eu

laminar_version="$1"
build_number="$2"

M laminarCI/entry.sh => laminarCI/entry.sh +1 -5
@@ 1,11 1,7 @@
#!/bin/sh -ex

if ! test -z "$LAMINAR_ENABLE_SSH"; then
    test -d /var/lib/laminar/.ssh &&
        rm -rf /var/lib/laminar/.ssh
    mkdir /var/lib/laminar/.ssh
    chown laminar:users /var/lib/laminar/.ssh
    chmod 700 /var/lib/laminar/.ssh
    rm -rf /var/lib/laminar/.ssh/authorized_keys
    sed -i -e 's#^laminar:x:100:100:Laminar:/var/lib/laminar:/sbin/nologin#laminar:x:100:100:Laminar:/var/lib/laminar:/bin/bash#' /etc/passwd
    sed -i -e 's/^laminar:!:/laminar:*:/' /etc/shadow
    for pubkey in $(ls /etc/authorized_keys); do