bug fixes: backend services patches - Implemented and deployed systemd-backed AMIs
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
FROM public.ecr.aws/docker/library/ubuntu:20.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
systemd \
|
||||
systemd-sysv \
|
||||
openssh-client \
|
||||
openssh-server \
|
||||
iproute2 \
|
||||
iptables \
|
||||
socat \
|
||||
curl \
|
||||
ca-certificates \
|
||||
&& systemctl enable ssh \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV container=docker
|
||||
STOPSIGNAL SIGRTMIN+3
|
||||
CMD ["/sbin/init"]
|
||||
@@ -0,0 +1,10 @@
|
||||
# Ubuntu 20.04 systemd EC2 guest
|
||||
|
||||
Build the local guest image before launching `ami-0abcdef1234567892`:
|
||||
|
||||
```text
|
||||
docker build --platform linux/amd64 -t floci/ami-ubuntu:20.04 docker/ec2/ami-images/ubuntu-20.04
|
||||
```
|
||||
|
||||
The image runs systemd and starts SSH on every EC2 boot. Enable application services with
|
||||
`systemctl enable --now <service>` so they restart after `StopInstances` and `StartInstances`.
|
||||
Reference in New Issue
Block a user