forked from oyama/Crypt-Keyczar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (29 loc) · 804 Bytes
/
Copy pathDockerfile
File metadata and controls
40 lines (29 loc) · 804 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
34
35
36
37
38
39
40
# Build stage
FROM ubuntu:18.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
build-essential \
libssl-dev \
libjson-perl \
perl && \
rm -rf /var/lib/apt/lists/*
COPY . /usr/src/keyczar/
WORKDIR /usr/src/keyczar
RUN perl Makefile.PL && \
make test && \
make install
# Runtime stage
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install \
libssl1.1 \
libjson-perl \
perl && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/lib/x86_64-linux-gnu/perl/ /usr/local/lib/x86_64-linux-gnu/perl/
COPY --from=builder /usr/local/bin/keyczar /usr/local/bin/keyczar
RUN useradd -m ubuntu
USER ubuntu
WORKDIR /home/ubuntu
ENTRYPOINT ["keyczar"]