Skip to content

Commit

Permalink
Fix problems with some usernames and uids in v1.10, fixes #1758, fixes
Browse files Browse the repository at this point in the history
…#1753 (#1764)

* Use debian instead of alpine to solve ssh-agent build problems

Debian is much more permissive about usernames and group names.

* Use useradd -l per issue

* Bump ssh-agent container to v1.10.1
  • Loading branch information
rfay committed Aug 4, 2019
1 parent 72b055b commit e700ebc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 51 deletions.
40 changes: 3 additions & 37 deletions containers/ddev-ssh-agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
# ddev-ssh-agent, forked from https://github.com/nardeas/docker-ssh-agent
# at https://github.com/nardeas/docker-ssh-agent/commit/fb6822d0003d1c0a795e183f5d257c2540fa74a4

# Docker Image for SSH agent container. Last revision 26.4.2018
#
# Copyright (c) Andreas Urbanski, 2018
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
FROM alpine:3.10

# Install dependencies
# Shadow allows high userids
RUN apk add --no-cache \
bash \
expect \
file \
openssh \
shadow \
socat \
sudo \
&& rm -rf /var/cache/apk/*
FROM bitnami/minideb:stretch

RUN apt-get update && apt-get install -y bash expect file openssh-client socat sudo psmisc && sudo apt autoclean

# Copy container files
COPY files /
Expand Down
7 changes: 0 additions & 7 deletions containers/ddev-ssh-agent/files/etc/group

This file was deleted.

5 changes: 0 additions & 5 deletions containers/ddev-ssh-agent/files/etc/passwd

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/ddevapp/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ FROM $BASE_IMAGE
ARG username
ARG uid
ARG gid
RUN (groupadd --gid $gid "$username" || groupadd "$username" || true) && (useradd -m --gid "$username" --comment '' --uid $uid "$username" || useradd -m --gid "$username" --comment '' "$username")
RUN (groupadd --gid $gid "$username" || groupadd "$username" || true) && (useradd -l -m --gid "$username" --comment '' --uid $uid "$username" || useradd -l -m --gid "$username" --comment '' "$username")
`
if extraPackages != nil {
contents = contents + `
Expand Down
2 changes: 1 addition & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ var RouterTag = "v1.10.0" // Note that this can be overridden by make

var SSHAuthImage = "drud/ddev-ssh-agent"

var SSHAuthTag = "v1.10.0"
var SSHAuthTag = "v1.10.1"

// COMMIT is the actual committish, supplied by make
var COMMIT = "COMMIT should be overridden"
Expand Down

0 comments on commit e700ebc

Please sign in to comment.