-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (29 loc) · 1.04 KB
/
Dockerfile
File metadata and controls
35 lines (29 loc) · 1.04 KB
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
## TODO: pin version tag
FROM ghcr.io/trueforge-org/golang:rolling@sha256:b45268d9e708d20793c55803d550b9fc64ecfc000b82ea043712076d913af089 AS builder
ARG TARGETARCH
ARG VERSION
USER root
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential python3 && \
rm -rf /var/lib/apt/lists/* && \
curl -s -o \
/tmp/hishtory.tar.gz -L \
"https://github.com/ddworken/hishtory/archive/v${VERSION}.tar.gz" && \
mkdir -p /build/hishtory && \
tar xf \
/tmp/hishtory.tar.gz -C \
/build/hishtory/ --strip-components=1 && \
cd /build/hishtory && \
unset GOPATH; go mod download && \
unset GOPATH; go build -o /server -ldflags "-X main.ReleaseVersion=v0.`cat VERSION`" backend/server/server.go
## TODO: change to an actual tag when this has an actual tag.
FROM ghcr.io/trueforge-org/postgresql-client:rolling@sha256:09242b4574a58545f171542e50c51664b6dd535d8411f79d788766a4f4b67740
# set version label
ARG VERSION
ARG TARGETARCH
USER apps
COPY --from=builder /server /app/server
COPY . /
EXPOSE 8080