-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (23 loc) · 1.29 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.16.9-alpine3.14 as builder
# Update apk ======================================================================================
RUN apk --update upgrade
# Intall essential packages =======================================================================
RUN apk add bash wget git
# Install build tools =============================================================================
RUN apk add build-base gcc
# Install Postgres client =========================================================================
RUN apk add postgresql-client
# Install line-ending conversion tool =============================================================
# This is only used during the duration of this Dockerfile and will be removed in the end.
RUN apk add dos2unix
# Update CA certificates
RUN apk add --no-cache ca-certificates && update-ca-certificates
# Copy entry/support files ========================================================================
COPY docker/entry.sh /entry.sh
RUN dos2unix --quiet /entry.sh
RUN chmod +x /entry.sh
# Cleanup =========================================================================================
RUN apk del dos2unix
RUN rm -rf /var/cache/apk/*
# Setup entry point ===============================================================================
ENTRYPOINT ["/entry.sh"]