-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
34 lines (28 loc) · 1.1 KB
/
Dockerfile
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
FROM golang:1.11.13
ENTRYPOINT [ "/app/entrypoint.sh" ]
EXPOSE 80 443
# Install packages.
RUN apt-get update && apt-get install -y jq nginx nodejs patch unzip && \
apt-get clean
# Generate SSL certs.
RUN mkdir -p /app/ssl && cd /app/ssl && \
openssl req -x509 -nodes -newkey rsa:4096 -sha256 \
-keyout privkey.pem -out fullchain.pem \
-days 36500 -subj '/CN=localhost' && \
openssl dhparam -dsaparam -out dhparam.pem 4096
# Generate swagger docs.
RUN apt-get install -y npm && npm install -g [email protected]
ADD swagger/swagger.yml swagger/config.json /app/swagger/
RUN ls /app/swagger/
RUN cd /app && pretty-swag -c /app/swagger/config.json
# Add awscli
RUN apt-get install -y \
python3-pip \
&& pip3 --no-cache-dir install --upgrade awscli \
&& apt-get clean
# Set up Go app.
ADD .build /src/github.com/Nextdoor/conductor/
ADD .build /go/src/github.com/Nextdoor/conductor/
RUN cd /src/github.com/Nextdoor/conductor/ && go build -o /app/conductor /src/github.com/Nextdoor/conductor/cmd/conductor/conductor.go
# Add static resources.
ADD resources/ /app