Skip to content

Commit

Permalink
Replace mkdir and cd with WORKDIR (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Feb 29, 2020
1 parent d3e73b1 commit 493ad61
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ RUN groupadd nginx \
# Clone the repository
RUN git clone --recurse-submodules https://github.com/weserv/images.git /var/www/imagesweserv

WORKDIR /var/www/imagesweserv
WORKDIR /var/www/imagesweserv/build

# Build CMake-based project
RUN mkdir build \
&& cd build \
&& cmake3 .. \
RUN cmake3 .. \
-DCMAKE_BUILD_TYPE=Release \
-DNGX_VERSION=$NGINX_VERSION \
-DCUSTOM_NGX_FLAGS="--prefix=/usr/share/nginx;\
Expand All @@ -78,8 +76,9 @@ RUN mkdir build \
--user=nginx;\
--group=nginx" \
&& make -j$(nproc) \
&& ldconfig \
&& cd ..
&& ldconfig

WORKDIR /var/www/imagesweserv

# Ensure nginx directories exist
RUN mkdir -p -m 700 /var/lib/nginx \
Expand Down

0 comments on commit 493ad61

Please sign in to comment.