-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat : cicd, docker-compose, dockerfile 생성 및 수정 (#589)
- Loading branch information
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Use the official NGINX base image | ||
FROM nginx:1.24.0 | ||
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
wget \ | ||
curl \ | ||
build-essential \ | ||
libpcre3-dev \ | ||
zlib1g-dev \ | ||
libmaxminddb-dev \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Download and extract NGINX source code | ||
ARG NGINX_VERSION=1.24.0 | ||
WORKDIR /usr/src | ||
RUN wget http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ | ||
tar -zxvf nginx-${NGINX_VERSION}.tar.gz && \ | ||
rm nginx-${NGINX_VERSION}.tar.gz | ||
|
||
# Clone ngx_http_geoip2_module | ||
RUN git clone https://github.com/leev/ngx_http_geoip2_module.git | ||
|
||
# Build NGINX with geoip2 module | ||
WORKDIR /usr/src/nginx-${NGINX_VERSION} | ||
RUN ./configure \ | ||
--with-compat \ | ||
--add-dynamic-module=../ngx_http_geoip2_module && \ | ||
make modules | ||
|
||
# Copy the built module to the NGINX modules directory | ||
RUN mkdir -p /usr/lib/nginx/modules/ | ||
RUN cp objs/ngx_http_geoip2_module.so /usr/lib/nginx/modules/ | ||
|
||
# Clean up | ||
RUN apt-get purge -y --auto-remove \ | ||
wget \ | ||
curl \ | ||
build-essential \ | ||
git && \ | ||
rm -rf /usr/src/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters