Posts

Showing posts from March, 2017

Amazon EC2 Container Service(ECS): EC2 instance does not appear on Cluster-ECS Instance Tab.

If you don't see EC2 Instance(ECS instance in formal??) on ECS-Cluster-ECS Instance tab on AWS console, try check EC2 instance must have ecsInstanceRole. EC2 instance must created from one of ecs-optimized AIM. user data of EC2 instance(Action -> Instance Setting -> User Data) has to include your cluster-name. EC2 must in subnet with internet-gateway.

Docker simplest alpine sshd

Long time no see, (but who cares?) As I struggled to install and run sshd on alpine linux, I want to share it with you. (I assume you are the one googled docker/alpine/sshd, aren't you?) Before docker build need public key to connect server. # create id_ed25519 and id_ed25199.pub to current dir. > sshd-keygen -t ed25519 Dockerfile FROM alpine RUN apk add --update --no-cache openssh && \ rm -rf /tmp/* /var/cache/apk/* && \ adduser -D user && \ passwd -u user && \ # SSHD CONFIG { \ echo "PermitRootLogin prohibit-password"; \ echo "PasswordAuthentication no"; \ } >> /etc/ssh/sshd_config && \ # GENERATE KEYS { \ echo "$PASS=PASS$RANDOM"; \ echo "PASSWORD for user is $PASS"; \ echo "echo -e $PASS'\n'$PASS | passwd user"; \ echo "ssh-keygen -A"; \ echo 'exec "$@"'; \ } > /usr/sbin/key_gen.sh COPY i...