diff --git a/.dockerignore b/.dockerignore index 6d09bb2128..fae28f2680 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,15 +1,31 @@ -Dockerfile -.github -.git .* +.git +.github +.github +.idea +.vscode +.waypoint *.bat +*.log *.md *.png *.toml +*.tpl +*.hcl +contracts/wasm +Dockerfile +docOps/ +documentation +evmemulator +gascalibration +packages/snapshot +packges/vm/wasmlib +schema +snapshot +tools +wal wasp wasp-cli -*.log -waspdb/ -docOps/ -tools/devnet -tools/cluster \ No newline at end of file +wasp-cluster +waspdb + diff --git a/Dockerfile b/Dockerfile index 059b889cd5..7bbea96eac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,7 @@ ARG BUILD_LD_FLAGS="" ARG BUILD_TARGET="./..." WORKDIR /wasp +RUN mkdir waspdb # Make sure that modules only get pulled when the module file has changed COPY go.mod go.sum ./ @@ -16,6 +17,7 @@ RUN go mod verify # Project build stage COPY . . + RUN go build -o . -tags=${BUILD_TAGS} -ldflags="${BUILD_LD_FLAGS}" ${BUILD_TARGET} ############################ @@ -35,6 +37,7 @@ EXPOSE 4000/udp # Copy the app dir into distroless image COPY --chown=nonroot:nonroot --from=build /wasp/${FINAL_BINARY} /usr/bin/ +COPY --chown=nonroot:nonroot --from=build /wasp/waspdb /waspdb WORKDIR /usr/bin/ USER nonroot diff --git a/tools/devnet/docker-compose.yml b/tools/devnet/docker-compose.yml index f028f63b6b..fdd5e36058 100644 --- a/tools/devnet/docker-compose.yml +++ b/tools/devnet/docker-compose.yml @@ -1,7 +1,7 @@ version: "3.9" services: hornet-nest: - image: iotaledger/hornet-nest:2.0.0-beta.7 + image: iotaledger/hornet-nest:2.0.0-beta.8 networks: - wasp-net ports: @@ -14,6 +14,11 @@ services: build: context: ../../ dockerfile: Dockerfile + command: + - "--dashboard.auth.scheme=none" + - "--webapi.auth.scheme=none" + - "--inx.address=hornet-nest:9029" + - "--database.directory=/waspdb" container_name: wasp depends_on: - hornet-nest @@ -21,7 +26,7 @@ services: networks: - wasp-net volumes: - - wasp-db:/wasp/waspdb + - wasp-db:/waspdb - ./wasp.config.json:/etc/wasp_config.json expose: - "4000/udp" # Peering