mirror of
https://github.com/wneessen/apg-go.git
synced 2024-11-25 15:20:50 +01:00
Merge pull request #41 from wneessen/dockerize
Add Dockerfile so apg-go can be dockerized via Github
This commit is contained in:
commit
1297c5a2eb
4 changed files with 34 additions and 0 deletions
19
Dockerfile
Normal file
19
Dockerfile
Normal file
|
@ -0,0 +1,19 @@
|
|||
## Build first
|
||||
FROM golang:latest as builder
|
||||
RUN mkdir /builddir
|
||||
ADD . /builddir/
|
||||
WORKDIR /builddir
|
||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags '-w -s -extldflags "-static"' -o apg-go \
|
||||
github.com/wneessen/apg-go/cmd/apg
|
||||
|
||||
## Create scratch image
|
||||
FROM scratch
|
||||
LABEL maintainer="wn@neessen.net"
|
||||
COPY ["docker-files/passwd", "/etc/passwd"]
|
||||
COPY ["docker-files/group", "/etc/group"]
|
||||
COPY --chown=apg-go ["LICENSE", "/apg-go/LICENSE"]
|
||||
COPY --chown=apg-go ["README.md", "/apg-go/README.md"]
|
||||
COPY --from=builder --chown=apg-go ["/builddir/apg-go", "/apg-go/apg-go"]
|
||||
WORKDIR /apg-go
|
||||
USER apg-go
|
||||
ENTRYPOINT ["/apg-go/apg-go"]
|
13
README.md
13
README.md
|
@ -12,6 +12,19 @@ Since FIPS-181 (pronouncable passwords) has been withdrawn in 2015, apg-go does
|
|||
it implements the [Koremutake Syllables System](https://shorl.com/koremutake.php) in its pronouncable password mode.
|
||||
|
||||
## Installation
|
||||
|
||||
### Docker
|
||||
There is a ready-to-use Docker image hosted on Github.
|
||||
|
||||
* Download the image:
|
||||
```shell
|
||||
$ docker pull ghcr.io/wneessen/apg-go:main
|
||||
```
|
||||
* Run the image:
|
||||
```shell
|
||||
$ docker run ghcr.io/wneessen/apg-go:main
|
||||
```
|
||||
|
||||
### Ports/Packages
|
||||
#### FreeBSD
|
||||
apg-go can be found as `/security/apg` in the [FreeBSD ports](https://cgit.freebsd.org/ports/tree/security/apg)
|
||||
|
|
1
docker-files/group
Normal file
1
docker-files/group
Normal file
|
@ -0,0 +1 @@
|
|||
apg-go:*:1000:apg-go
|
1
docker-files/passwd
Normal file
1
docker-files/passwd
Normal file
|
@ -0,0 +1 @@
|
|||
apg-go:*:1000:1000:Automated Password Generator User:/apg-go:/usr/bin/false
|
Loading…
Reference in a new issue