Skip to content
Snippets Groups Projects
Commit 133c2df7 authored by Travis Ralston's avatar Travis Ralston
Browse files

Make Dockerfile safe for Windows

parent 79fb61b5
No related branches found
No related tags found
No related merge requests found
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
FROM golang:1.12-alpine AS builder FROM golang:1.12-alpine AS builder
# Install build dependencies # Install build dependencies
RUN apk add --no-cache git musl-dev RUN apk add --no-cache git musl-dev dos2unix
COPY . /opt
WORKDIR /opt WORKDIR /opt
COPY . /opt
RUN dos2unix ./build.sh ./docker/run.sh
RUN ./build.sh RUN ./build.sh
# ---- Stage 1 ---- # ---- Stage 1 ----
...@@ -19,11 +18,13 @@ COPY --from=builder /opt/bin/media_repo /opt/bin/import_synapse /usr/local/bin/ ...@@ -19,11 +18,13 @@ COPY --from=builder /opt/bin/media_repo /opt/bin/import_synapse /usr/local/bin/
RUN apk add --no-cache \ RUN apk add --no-cache \
su-exec \ su-exec \
ca-certificates ca-certificates \
dos2unix
COPY ./config.sample.yaml /etc/media-repo.yaml.sample COPY ./config.sample.yaml /etc/media-repo.yaml.sample
COPY ./migrations /var/lib/media-repo-migrations COPY ./migrations /var/lib/media-repo-migrations
COPY ./docker/run.sh /usr/local/bin/ COPY ./docker/run.sh /usr/local/bin/
RUN dos2unix /usr/local/bin/run.sh
ENV REPO_CONFIG=/data/media-repo.yaml ENV REPO_CONFIG=/data/media-repo.yaml
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment