-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (28 loc) · 887 Bytes
/
Dockerfile
File metadata and controls
29 lines (28 loc) · 887 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
FROM golang:1.15.6 as builder
WORKDIR /go/src/github.com/bottlerocketlabs/pair/
COPY . .
RUN go build -ldflags="-s -w -X main.version=$(git tag --points-at HEAD) -X main.commit=$(git rev-parse --short HEAD)" ./cmd/pair
RUN go get -v github.com/bottlerocketlabs/remote-pbcopy/cmd/pbcopy
FROM ubuntu:20.04
ENV UNAME="pair"
RUN apt update && \
apt install -y \
bash \
ca-certificates \
curl \
git \
sudo \
tmux \
vim \
wget \
zsh && \
adduser --home /home/$UNAME --gecos "" --disabled-password $UNAME && \
usermod -aG sudo $UNAME && \
echo "$UNAME ALL=(ALL) NOPASSWD:ALL" | tee /etc/sudoers.d/$UNAME
USER $UNAME
WORKDIR /home/$UNAME
COPY --from=builder /go/src/github.com/bottlerocketlabs/pair/pair /bin
COPY --from=builder /go/bin/pbcopy /bin
# ENV DOTFILES_REPO= # FIXME
ADD entrypoint /bin/entrypoint
ENTRYPOINT [ "/bin/entrypoint" ]