mirror of
https://github.com/tsl0922/ttyd.git
synced 2025-12-24 20:54:21 +01:00
Dockerfile best practices recommend to move the installation of external dependencies before specific code. This will improve local development experience by improving Docker cache management and it will improve final Docker images compaction by sharing the first layers.
16 lines
224 B
Docker
16 lines
224 B
Docker
FROM alpine
|
|
|
|
ARG TARGETARCH
|
|
|
|
# Dependencies
|
|
RUN apk add --no-cache bash tini
|
|
|
|
# Application
|
|
COPY ./dist/${TARGETARCH}/ttyd /usr/bin/ttyd
|
|
|
|
EXPOSE 7681
|
|
WORKDIR /root
|
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
|
CMD ["ttyd", "-W", "bash"]
|