Skip to content

Commit 3316b8e

Browse files
authored
Add dockerfile (#46)
1 parent fb50618 commit 3316b8e

3 files changed

Lines changed: 35 additions & 1 deletion

File tree

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.git
2+
.github
3+
.gitignore
4+
*.md
5+
!go.mod
6+
LICENSE
7+
assets
8+
docs
9+
bin
10+
_awsd_prompt

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV
3232
3333
- name: Create Release 🎉
34-
uses: ncipollo/release-action@v1.20.0
34+
uses: ncipollo/release-action@v1
3535
if: github.ref_type == 'tag'
3636
with:
3737
bodyFile: "changelog.txt"

Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM golang:1.25-alpine3.23 AS builder
2+
3+
WORKDIR /app
4+
5+
COPY go.mod go.sum ./
6+
RUN go mod download
7+
8+
COPY . .
9+
10+
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o _awsd_prompt
11+
12+
FROM alpine:3.23
13+
14+
RUN adduser -D -u 1000 awsd
15+
16+
COPY --from=builder /app/_awsd_prompt /usr/local/bin/_awsd_prompt
17+
COPY scripts/_awsd /usr/local/bin/_awsd
18+
COPY scripts/_awsd_autocomplete /usr/local/bin/_awsd_autocomplete
19+
20+
USER awsd
21+
WORKDIR /home/awsd
22+
23+
ENTRYPOINT ["_awsd_prompt"]
24+
# docker run -it -v ~/.aws:/home/awsd/.aws:ro -v ~/.awsd:/home/awsd/.awsd awsd

0 commit comments

Comments
 (0)