aboutsummaryrefslogtreecommitdiffhomepage
path: root/Dockerfile
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-08-18 18:03:47 +0200
committerRon Evans <[email protected]>2019-09-15 18:04:38 +0200
commit8d959b7c636a392046558046e9b423efb2c288bb (patch)
treeac08fb17aae4ef6a8ed61daf05d21854391e5aed /Dockerfile
parent02c40202285da6c5d0a2f36279017e35223380d8 (diff)
downloadtinygo-8d959b7c636a392046558046e9b423efb2c288bb.tar.gz
tinygo-8d959b7c636a392046558046e9b423efb2c288bb.zip
all: replace dep with Go modules
We've moved to go modules, and keeping both working is burdensome. In fact, I think dep already wasn't working.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile47
1 files changed, 22 insertions, 25 deletions
diff --git a/Dockerfile b/Dockerfile
index f1071087d..0d3065b90 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,26 +6,23 @@ RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
apt-get update && \
apt-get install -y llvm-8-dev libclang-8-dev git
-RUN wget -O- https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
-
-COPY . /go/src/github.com/tinygo-org/tinygo
+COPY . /tinygo
# remove submodules directories and re-init them to fix any hard-coded paths
# after copying the tinygo directory in the previous step.
-RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
+RUN cd /tinygo/ && \
rm -rf ./lib/* && \
git submodule update --init --recursive --force
-RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
- dep ensure --vendor-only && \
- go install /go/src/github.com/tinygo-org/tinygo/
+RUN cd /tinygo/ && \
+ go install /tinygo/
# tinygo-wasm stage installs the needed dependencies to compile TinyGo programs for WASM.
FROM tinygo-base AS tinygo-wasm
COPY --from=tinygo-base /go/bin/tinygo /go/bin/tinygo
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/src /go/src/github.com/tinygo-org/tinygo/src
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/targets /go/src/github.com/tinygo-org/tinygo/targets
+COPY --from=tinygo-base /tinygo/src /tinygo/src
+COPY --from=tinygo-base /tinygo/targets /tinygo/targets
RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list && \
@@ -36,13 +33,13 @@ RUN wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key| apt-key add - && \
FROM tinygo-base AS tinygo-avr
COPY --from=tinygo-base /go/bin/tinygo /go/bin/tinygo
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/src /go/src/github.com/tinygo-org/tinygo/src
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/targets /go/src/github.com/tinygo-org/tinygo/targets
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/Makefile /go/src/github.com/tinygo-org/tinygo/
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/tools /go/src/github.com/tinygo-org/tinygo/tools
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/lib /go/src/github.com/tinygo-org/tinygo/lib
+COPY --from=tinygo-base /tinygo/src /tinygo/src
+COPY --from=tinygo-base /tinygo/targets /tinygo/targets
+COPY --from=tinygo-base /tinygo/Makefile /tinygo/
+COPY --from=tinygo-base /tinygo/tools /tinygo/tools
+COPY --from=tinygo-base /tinygo/lib /tinygo/lib
-RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
+RUN cd /tinygo/ && \
apt-get update && \
apt-get install -y apt-utils python3 make binutils-avr gcc-avr avr-libc && \
make gen-device-avr && \
@@ -54,13 +51,13 @@ RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
FROM tinygo-base AS tinygo-arm
COPY --from=tinygo-base /go/bin/tinygo /go/bin/tinygo
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/src /go/src/github.com/tinygo-org/tinygo/src
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/targets /go/src/github.com/tinygo-org/tinygo/targets
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/Makefile /go/src/github.com/tinygo-org/tinygo/
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/tools /go/src/github.com/tinygo-org/tinygo/tools
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/lib /go/src/github.com/tinygo-org/tinygo/lib
+COPY --from=tinygo-base /tinygo/src /tinygo/src
+COPY --from=tinygo-base /tinygo/targets /tinygo/targets
+COPY --from=tinygo-base /tinygo/Makefile /tinygo/
+COPY --from=tinygo-base /tinygo/tools /tinygo/tools
+COPY --from=tinygo-base /tinygo/lib /tinygo/lib
-RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
+RUN cd /tinygo/ && \
apt-get update && \
apt-get install -y apt-utils python3 make clang-8 && \
make gen-device-nrf && make gen-device-stm32 && \
@@ -71,11 +68,11 @@ RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
# tinygo-all stage installs the needed dependencies to compile TinyGo programs for all platforms.
FROM tinygo-wasm AS tinygo-all
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/Makefile /go/src/github.com/tinygo-org/tinygo/
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/tools /go/src/github.com/tinygo-org/tinygo/tools
-COPY --from=tinygo-base /go/src/github.com/tinygo-org/tinygo/lib /go/src/github.com/tinygo-org/tinygo/lib
+COPY --from=tinygo-base /tinygo/Makefile /tinygo/
+COPY --from=tinygo-base /tinygo/tools /tinygo/tools
+COPY --from=tinygo-base /tinygo/lib /tinygo/lib
-RUN cd /go/src/github.com/tinygo-org/tinygo/ && \
+RUN cd /tinygo/ && \
apt-get update && \
apt-get install -y apt-utils python3 make clang-8 binutils-avr gcc-avr avr-libc && \
make gen-device && \