일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- k8s
- cephadm
- golang
- ceph-ansible
- i3
- OpenStack
- repository
- libvirt
- yum
- grafana-loki
- kolla
- Kubernetes
- Kubeflow
- terraform
- port open
- Octavia
- Ansible
- nfs-provisioner
- pacman
- Docker
- awx
- KVM
- Linux
- HTML
- ceph
- archlinux
- cloud-init
- Arch
- kolla-ansible
- ubuntu
Archives
- Today
- Total
YJWANG
Docker 테스트 httpd 구성 (ssl 인증서 적용 포함) 본문
Docker http
Dockerfile
FROM httpd
COPY test1_index /usr/local/apache2/htdocs/index.html
Index page
# cat test1_index
test1 index page
Docker https
Local 인증서 생성
# openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
Dockerfile
FROM ilkka/httpd
# These are self-generated certs not meant for any real use!
COPY cert.pem /usr/local/apache2/conf/server.crt
COPY key.pem /usr/local/apache2/conf/server.key
COPY test1_index /usr/local/apache2/htdocs/index.html
EXPOSE 443
RUN sed -i 's%#\(Include conf/extra/httpd-ssl.conf\)%\1%' conf/httpd.conf \
&& sed -i 's%#\(LoadModule ssl_module modules/mod_ssl.so\)%\1%' conf/httpd.conf \
&& sed -i 's%#\(LoadModule socache_shmcb_module modules/mod_socache_shmcb.so\)%\1%' conf/httpd.conf \
&& sed -i 's%ServerName www.example.com:443%ServerName ${SERVER_NAME}:443%' conf/extra/httpd-ssl.conf
Test
[root@wyj05_deploy_0 ~]# curl -k https://localhost:8443
test1 https server
반응형