Skip to content

Commit

Permalink
⬆ Update openresty docker image to latest
Browse files Browse the repository at this point in the history
  • Loading branch information
axeltlarsson committed Jun 15, 2024
1 parent 1f2e39b commit a134ac6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ services:
openresty:
build: # openresty image builds the frontend, so needs access to that context
context: openresty
command: ["/usr/bin/openresty", "-g", "daemon off; error_log /dev/stderr info;"]
command: ["openresty", "-g", "daemon off; error_log /dev/stderr info;"]
environment:
- DEVELOPMENT=${DEVELOPMENT}
- POSTGREST_HOST=${POSTGREST_HOST}
Expand Down
2 changes: 1 addition & 1 deletion nix/docker-compose.nixos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ services:
# to PostgREST down the stack.
openresty:
image: ghcr.io/axeltlarsson/receptdatabasen-openresty:latest
command: ["/usr/bin/openresty", "-g", "daemon off; error_log /dev/stderr info;"]
command: ["openresty", "-g", "daemon off; error_log /dev/stderr info;"]
environment:
- DEVELOPMENT=1
- POSTGREST_HOST=postgrest
Expand Down
18 changes: 7 additions & 11 deletions openresty/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build vips in a builder container, taken from:
# https://github.com/h2non/imaginary/blob/master/Dockerfile
ARG GOLANG="1.13"
FROM --platform=linux/amd64 golang:${GOLANG} as builder
FROM golang:${GOLANG} as builder

ARG LIBVIPS_VERSION="8.12.2"

Expand Down Expand Up @@ -40,7 +40,7 @@ RUN DEBIAN_FRONTEND=noninteractive \
ldconfig

# The final openresty image
FROM openresty/openresty:buster
FROM openresty/openresty:jammy
LABEL org.opencontainers.image.source=https://github.com/axeltlarsson/receptdatabasen-api
LABEL org.opencontainers.image.description="Receptdatabasen openresty"

Expand All @@ -50,22 +50,18 @@ COPY --from=builder /usr/local/lib /usr/local/lib
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && \
apt-get install --no-install-recommends -y \
libglib2.0-0 libjpeg62-turbo libpng16-16 \
libwebp6 libwebpmux3 libwebpdemux2 libtiff5 libgif7 libexif12 libxml2 \
libglib2.0-0 libjpeg-turbo8 libpng16-16 \
libwebp7 libwebpmux3 libwebpdemux2 libtiff5 libgif7 libexif12 libxml2 \
libgsf-1-114 fftw3 liborc-0.4-0 librsvg2-2 libheif1 && \
apt-get autoremove -y && \
apt-get autoclean && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install luarocks
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
luarocks

# Install lua-vips
RUN luarocks install lua-vips
RUN luarocks install lua-resty-session
RUN /usr/local/openresty/luajit/bin/luarocks config --lua-version=5.1 rocks_provided.luaffi-tkl 2.1-1
RUN /usr/local/openresty/luajit/bin/luarocks install lua-vips
RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-session

RUN mkdir -p /uploads/cache && chown -R nobody /uploads
VOLUME /uploads
Expand Down

0 comments on commit a134ac6

Please sign in to comment.