P.S:

~/remote/htwtxt » podman image list htwtxt                                                                                the@wks
REPOSITORY                TAG           IMAGE ID      CREATED      SIZE
localhost/htwtxt          1.0.5-alpine  13610a37e347  3 hours ago  20.1 MB
localhost/htwtxt          1.0.7-alpine  2a5c560ee6b7  3 hours ago  20.1 MB
docker.io/buckket/htwtxt  latest        c0e33b2913c6  8 years ago  778 MB

⤋ Read More

@bender@twtxt.net here:

FROM golang:alpine as builder
ARG version
ENV HTWTXT_VERSION=$version

WORKDIR $GOPATH/pkg/

RUN wget -O htwtxt.tar.gz https://github.com/plomlompom/htwtxt/archive/refs/tags/${HTWTXT_VERSION}.tar.gz
RUN tar xf htwtxt.tar.gz && cd htwtxt-${HTWTXT_VERSION} && go mod init htwtxt && go mod tidy && go install htwtxt

FROM alpine
ARG version
ENV HTWTXT_VERSION=$version

RUN mkdir -p /srv/htwtxt
COPY --from=builder /go/bin/htwtxt /usr/bin/
COPY --from=builder /go/pkg/htwtxt-${HTWTXT_VERSION}/templates/* /srv/htwtxt/templates/
WORKDIR /srv/htwtxt
VOLUME /srv/htwtxt

EXPOSE 8000

ENTRYPOINT ["htwtxt", "-dir", "/srv/htwtxt", "-templates", "/srv/htwtxt/templates"]

Don’t forget the --build-arg version="1.0.7" for example when building this one, although there isn’t much difference between the couple last versions.
P.S: I may have effed up changing htwtxt’s files directory to /srv/htwtxt when the command itself defaults to /root/htwtxt so you’ll have to throw in a -dir whenever you issue an htwtxt command (i.e: htwtxt -adduser somename:somepwd -dir /srv/htwtxt … etc)

⤋ Read More

@bender@twtxt.net Dud! you should see the updated version! 😂 I have just discovered the scratch #container image and decided I wanted to play with it… I’m probably going to end up rebuilding a LOT of images.

~/htwtxt » podman image list htwtxt
REPOSITORY                TAG            IMAGE ID      CREATED             SIZE
localhost/htwtxt          1.0.7-scratch  2d5c6fb7862f  About a minute ago  12 MB
localhost/htwtxt          1.0.5-alpine   13610a37e347  4 weeks ago         20.1 MB
localhost/htwtxt          1.0.7-alpine   2a5c560ee6b7  4 weeks ago         20.1 MB
docker.io/buckket/htwtxt  latest         c0e33b2913c6  8 years ago         778 MB

⤋ Read More

Participate

Login to join in on this yarn.