Skip to content

Commit adcdb75

Browse files
authored
Merge pull request #972 from hubmapconsortium/yuanzhou/docker-compose
Yuanzhou/docker compose
2 parents 4f54891 + 269cd85 commit adcdb75

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

docker/docker-development.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ else
8383

8484
echo 'Checks complete, all good :)'
8585
elif [ "$1" = "config" ]; then
86-
docker-compose -f docker-compose.yml -f docker-compose.development.yml -p entity-api config
86+
docker compose -f docker-compose.yml -f docker-compose.development.yml -p entity-api config
8787
elif [ "$1" = "build" ]; then
8888
# Delete the copied source code dir if exists
8989
if [ -d "entity-api/src" ]; then

docker/entity-api/Dockerfile

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,27 @@ EOF
3737
# 8 - Make the start script executable
3838
# 9 - Clean the dnf/yum cache and other locations to reduce Docker Image layer size.
3939
# Assume the base image has upgraded dnf and installed its dnf-plugins-core
40-
RUN dnf install --assumeyes nginx && \
41-
# Push aside nginx default.conf files that may exist on the system
42-
[ ! -f /etc/nginx/conf.d/default.conf ] || mv /etc/nginx/conf.d/default.conf /tmp/etc_nginx_conf.d_default.conf.ORIGINAL && \
43-
[ ! -f /etc/nginx/nginx.conf ] || mv /etc/nginx/nginx.conf /tmp/etc_nginx_nginx.conf.ORIGINAL && \
44-
# Install the nginx default.conf file just installed in WORKDIR
45-
mv nginx/nginx.conf /etc/nginx/nginx.conf && \
46-
# Clean up the nginx install directory in WORKDIR
47-
[ ! -d nginx ] || mv nginx /tmp/nginx_from_WORKDIR && \
48-
# Push aside the verification file from the base image which will
49-
# no longer report correctly once uWSGI is started for the service.
50-
[ ! -f /tmp/verify_uwsgi.sh ] || mv /tmp/verify_uwsgi.sh /tmp/verify_uwsgi.sh.ORIGINAL && \
51-
# Install the requirements.txt file for the service
52-
pip3.13 install --no-cache-dir --upgrade pip -r src/requirements.txt && \
53-
# Make the script referenced in the CMD directive below executable.
54-
chmod a+x start.sh && \
55-
# Clean up artifacts to slim down this layer of the Docker Image
56-
dnf clean all && \
57-
rm -rf /var/cache/dnf \
58-
/var/log/dnf \
59-
/var/log/yum \
60-
/root/.cache
40+
RUN dnf install --assumeyes nginx && \
41+
# Push aside nginx default.conf files that may exist on the system
42+
[ ! -f /etc/nginx/conf.d/default.conf ] || mv /etc/nginx/conf.d/default.conf /tmp/etc_nginx_conf.d_default.conf.ORIGINAL && \
43+
[ ! -f /etc/nginx/nginx.conf ] || mv /etc/nginx/nginx.conf /tmp/etc_nginx_nginx.conf.ORIGINAL && \
44+
# Install the nginx default.conf file just installed in WORKDIR
45+
mv nginx/nginx.conf /etc/nginx/nginx.conf && \
46+
# Clean up the nginx install directory in WORKDIR
47+
[ ! -d nginx ] || mv nginx /tmp/nginx_from_WORKDIR && \
48+
# Push aside the verification file from the base image which will
49+
# no longer report correctly once uWSGI is started for the service.
50+
[ ! -f /tmp/verify_uwsgi.sh ] || mv /tmp/verify_uwsgi.sh /tmp/verify_uwsgi.sh.ORIGINAL && \
51+
# Install the requirements.txt file for the service
52+
pip3.13 install --no-cache-dir --upgrade pip -r src/requirements.txt && \
53+
# Make the script referenced in the CMD directive below executable.
54+
chmod a+x start.sh && \
55+
# Clean up artifacts to slim down this layer of the Docker Image
56+
dnf clean all && \
57+
rm -rf /var/cache/dnf \
58+
/var/log/dnf \
59+
/var/log/yum \
60+
/root/.cache
6161

6262
# The EXPOSE instruction informs Docker that the container listens on the specified network ports at runtime.
6363
# EXPOSE does not make the ports of the container accessible to the host.

0 commit comments

Comments
 (0)