forked from shelfio/ghostscript-lambda-layer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (29 loc) · 902 Bytes
/
Dockerfile
File metadata and controls
33 lines (29 loc) · 902 Bytes
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
32
33
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
ENV GS_TAG=gs10051
ENV GS_VERSION=10.05.1
# Install system build dependencies
RUN apt-get update && apt-get install -y \
build-essential \
wget \
curl \
zip \
gcc \
g++ \
make \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Build and install Ghostscript
RUN mkdir -p /usr/local/src/ghostscript && \
cd /usr/local/src/ghostscript && \
wget -q https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/${GS_TAG}/ghostscript-${GS_VERSION}.tar.gz && \
tar -zxf ghostscript-${GS_VERSION}.tar.gz && \
cd ghostscript-${GS_VERSION} && \
./configure --without-luratech && \
make -j$(nproc) && \
make install
# Package /opt directory as Lambda layer zip
RUN mkdir -p /opt/bin && \
cp /usr/local/bin/gs /opt/bin/ && \
cd /opt && \
zip -r /tmp/ghostscript.zip .