forked from docker-library/bashbrew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (26 loc) · 840 Bytes
/
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 tianon/docker-tianon
SHELL ["bash", "-Eeuo", "pipefail", "-xc"]
RUN apt-get update; \
apt-get install -y --no-install-recommends \
git \
golang-go \
; \
rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/bashbrew
COPY go.mod go.sum ./
RUN go mod download; go mod verify
COPY bashbrew.sh ./
COPY cmd cmd
RUN export CGO_ENABLED=0; \
bash -x ./bashbrew.sh --version; \
rm -r ~/.cache/go-build; \
mv bin/bashbrew /usr/local/bin/; \
bashbrew --version
ENV BASHBREW_CACHE /bashbrew-cache
# make sure our default cache dir exists and is writable by anyone (similar to /tmp)
RUN mkdir -p "$BASHBREW_CACHE"; \
chmod 1777 "$BASHBREW_CACHE"
# (this allows us to decide at runtime the exact uid/gid we'd like to run as)
VOLUME $BASHBREW_CACHE
COPY scripts/bashbrew-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["bashbrew-entrypoint.sh"]