Skip to content

Commit

Permalink
Merge pull request #200 from nebulous/alpine
Browse files Browse the repository at this point in the history
port docker image from debian to alpine
  • Loading branch information
nebulous authored Feb 7, 2025
2 parents a000bad + 8e5949c commit 5235642
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
19 changes: 7 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
ARG BASE_IMAGE=debian:latest
ARG BASE_IMAGE=alpine:latest
FROM ${BASE_IMAGE}

COPY . /infinitude
WORKDIR /infinitude

RUN apt-get update \
&& apt-get install -y jq locales cpanminus libchi-perl libmojolicious-perl libdatetime-perl libxml-simple-perl libtry-tiny-perl libmoo-perl libjson-perl libjson-maybexs-perl libhash-asobject-perl libdata-parsebinary-perl libdigest-crc-perl libcache-perl libtest-longstring-perl libio-pty-perl libpath-tiny-perl \
&& cpanm -n IO::Termios \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& apt-get -y --purge remove cpanminus \
&& apt autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache make perl-app-cpanminus perl-mojolicious perl-chi perl-datetime perl-path-tiny perl-json perl-xml-simple perl-moo perl-io-tty
RUN cpanm -n Data::ParseBinary Digest::CRC Hash::AsObject IO::Termios
RUN apk --purge del apk-tools make perl-app-cpanminus

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV APP_SECRET="Pogotudinal"
ENV PASS_REQS="1020"
ENV MODE="Production"
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ services:
- APP_SECRET=Pogotudinal
- PASS_REQS=300
- MODE=Production
- SERIAL_TTY=/dev/ttyUSB0
# - SERIAL_TTY=/dev/ttyUSB0
# - SERIAL_SOCKET=192.168.1.47:23
devices:
- /dev/ttyUSB0:/dev/ttyUSB0
# devices:
# - /dev/ttyUSB0:/dev/ttyUSB0
restart: always
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

# Generate the config file from environment variables
echo "{\"app_secret\":\"$APP_SECRET\",\"pass_reqs\":$PASS_REQS,\"serial_tty\":\"$SERIAL_TTY\",\"serial_socket\":\"$SERIAL_SOCKET\"}" > /infinitude/infinitude.json
Expand Down

0 comments on commit 5235642

Please sign in to comment.