Browse Source

set tcp ports via env variables

pull/1175/head
Romain L 5 years ago
parent
commit
a2520491a1
  1. 8
      docker/Dockerfile.j2
  2. 8
      docker/amd64/Dockerfile
  3. 8
      docker/amd64/Dockerfile.alpine
  4. 8
      docker/arm32v6/Dockerfile
  5. 8
      docker/arm32v7/Dockerfile
  6. 8
      docker/arm32v7/Dockerfile.alpine
  7. 8
      docker/arm64v8/Dockerfile

8
docker/Dockerfile.j2

@ -204,8 +204,10 @@ RUN cargo build --features ${DB} --release --target=armv7-unknown-linux-gnueabih
# because we already have a binary built
FROM {{ runtime_stage_base_image }}
ARG ROCKET_PORT=80
ARG WEBSOCKET_PORT=3012
ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_PORT=$ROCKET_PORT
ENV ROCKET_WORKERS=10
{% if "alpine" in runtime_stage_base_image %}
ENV SSL_CERT_DIR=/etc/ssl/certs
@ -252,8 +254,8 @@ RUN [ "cross-build-end" ]
{% endif %}
VOLUME /data
EXPOSE 80
EXPOSE 3012
EXPOSE $ROCKET_PORT
EXPOSE $WEBSOCKET_PORT
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage

8
docker/amd64/Dockerfile

@ -68,8 +68,10 @@ RUN cargo build --features ${DB} --release
# because we already have a binary built
FROM debian:buster-slim
ARG ROCKET_PORT=80
ARG WEBSOCKET_PORT=3012
ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_PORT=$ROCKET_PORT
ENV ROCKET_WORKERS=10
# Install needed libraries
@ -85,8 +87,8 @@ RUN apt-get update && apt-get install -y \
RUN mkdir /data
VOLUME /data
EXPOSE 80
EXPOSE 3012
EXPOSE $ROCKET_PORT
EXPOSE $WEBSOCKET_PORT
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage

8
docker/amd64/Dockerfile.alpine

@ -66,8 +66,10 @@ RUN cargo build --features ${DB} --release --target=x86_64-unknown-linux-musl
# because we already have a binary built
FROM alpine:3.12
ARG ROCKET_PORT=80
ARG WEBSOCKET_PORT=3012
ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_PORT=$ROCKET_PORT
ENV ROCKET_WORKERS=10
ENV SSL_CERT_DIR=/etc/ssl/certs
@ -79,8 +81,8 @@ RUN apk add --no-cache \
RUN mkdir /data
VOLUME /data
EXPOSE 80
EXPOSE 3012
EXPOSE $ROCKET_PORT
EXPOSE $WEBSOCKET_PORT
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage

8
docker/arm32v6/Dockerfile

@ -87,8 +87,10 @@ RUN cargo build --features ${DB} --release --target=arm-unknown-linux-gnueabi
# because we already have a binary built
FROM balenalib/rpi-debian:buster
ARG ROCKET_PORT=80
ARG WEBSOCKET_PORT=3012
ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_PORT=$ROCKET_PORT
ENV ROCKET_WORKERS=10
RUN [ "cross-build-start" ]
@ -107,8 +109,8 @@ RUN mkdir /data
RUN [ "cross-build-end" ]
VOLUME /data
EXPOSE 80
EXPOSE 3012
EXPOSE $ROCKET_PORT
EXPOSE $WEBSOCKET_PORT
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage

8
docker/arm32v7/Dockerfile

@ -87,8 +87,10 @@ RUN cargo build --features ${DB} --release --target=armv7-unknown-linux-gnueabih
# because we already have a binary built
FROM balenalib/armv7hf-debian:buster
ARG ROCKET_PORT=80
ARG WEBSOCKET_PORT=3012
ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_PORT=$ROCKET_PORT
ENV ROCKET_WORKERS=10
RUN [ "cross-build-start" ]
@ -107,8 +109,8 @@ RUN mkdir /data
RUN [ "cross-build-end" ]
VOLUME /data
EXPOSE 80
EXPOSE 3012
EXPOSE $ROCKET_PORT
EXPOSE $WEBSOCKET_PORT
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage

8
docker/arm32v7/Dockerfile.alpine

@ -67,8 +67,10 @@ RUN musl-strip target/armv7-unknown-linux-musleabihf/release/bitwarden_rs
# because we already have a binary built
FROM cmosh/alpine-arm:3.6
ARG ROCKET_PORT=80
ARG WEBSOCKET_PORT=3012
ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_PORT=$ROCKET_PORT
ENV ROCKET_WORKERS=10
ENV SSL_CERT_DIR=/etc/ssl/certs
@ -86,8 +88,8 @@ RUN mkdir /data
RUN [ "cross-build-end" ]
VOLUME /data
EXPOSE 80
EXPOSE 3012
EXPOSE $ROCKET_PORT
EXPOSE $WEBSOCKET_PORT
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage

8
docker/arm64v8/Dockerfile

@ -87,8 +87,10 @@ RUN cargo build --features ${DB} --release --target=aarch64-unknown-linux-gnu
# because we already have a binary built
FROM balenalib/aarch64-debian:buster
ARG ROCKET_PORT=80
ARG WEBSOCKET_PORT=3012
ENV ROCKET_ENV "staging"
ENV ROCKET_PORT=80
ENV ROCKET_PORT=$ROCKET_PORT
ENV ROCKET_WORKERS=10
RUN [ "cross-build-start" ]
@ -107,8 +109,8 @@ RUN mkdir /data
RUN [ "cross-build-end" ]
VOLUME /data
EXPOSE 80
EXPOSE 3012
EXPOSE $ROCKET_PORT
EXPOSE $WEBSOCKET_PORT
# Copies the files from the context (Rocket.toml file and web-vault)
# and the binary from the "build" stage to the current stage

Loading…
Cancel
Save